Hello,
Duo to the limited grid functionality of TTMSFNCGridDatabaseAdapter, I have to use LoadAllDataAndDisconnect.
However, from time to time I need to refresh the data in the grid.
I tried this but it doesn't work:
MyQuery.Close;
MyQuery.Open;
MyFncGrid.Columns.BeginUpdate;
MyFncGrid.Columns.Clear;
MyGridDatabaseAdapter.AutoCreateColumns := True;
MyGridDatabaseAdapter.Active := True; // the adapter is already connected with MyQuery
MyFncGrid.AutoSizeColumns;
MyGridDatabaseAdapter.LoadAllDataAndDisconnect;
MyFncGrid.Columns.EndUpdate;
After the code above, I can see in Debug that MyFncGrid.Columns.count=5, MyFncGrid.RowCount=10, however the grid is empty.
What should I do? Thank you!