I'm using the grid with a custom data source that is empty when the application starts. On initial paint the form asks the data source for its row count and it returns 0.
CommandResponseGrid->BeginUpdate();
commandGridData->AddRow(Now(), message.message, message.tube);
CommandResponseGrid->DataRowCount = commandGridData->RowCount(); //tried this but it doesn't help...
CommandResponseGrid->EndUpdate();
After this the grid calls the custom data's RowCount() method, which returns the number of rows. The grid then displays just one an empty row regardless of how many rows I add to the data, but at no time does the grid call the GetDataCell(int Row, int Col) method to fetch the data. I don't understand why this is...
If, on app startup, I return a number greater than 0 from RowCount() the grid does call GetDataCell but, of course, there's no data at that time. It's like initially returning 0 from RowCount() makes the grid decide there never will be any data to fetch?
Do I need to do something else to get the grid to update the data values?
Andy
Comments