I am using a TFNCGrid, TTMSFNCGridDatabaseAdapter for a restaurant point of sale. I have a tblTicketItem1 (DBISAM) data table connected to the FNCGrid using the Database Adapter. I also have a tblTicketIem2 pointing to the same data table, that is used for doing most of the work to create the data records. When an item is added to or edited on the ticket, multiple records will be added/edited using the tblTicketIem2 component. Then I call the Refresh method of the first table (tblTicketItem1) that is connected to the FNCGrid so that the changes will be reflected in the FNCGrid.
This works fine as long as all the records for that item are visible in the grid before editing. When editing an item that comprises of multiple records and the records are only partially displayed. For example: If I have a pizza that include 10 toppings I would have one record for the pizza and 10 records, one for each topping. If only 5 of the records are visible in the grid when I edit; then after making changes and updating the data records I call tblTicketItem1.Refresh to update the grid's display and I get an access violation.
PS. I wish I had a better understanding of the relationship of TFNCGrid, TTMSFNCGridDatabaseAdapter to the TDataset; and when using multiple data cursors (TTables) and when synchronization is needed (like what we do in the GetCellLayout event). For example: is synchronization needed also in the OnSelectedEvent?
I hope my description is not too confusing.