I have a TListView linked in LiveBindings with a TFDMemTable. I load data in the FDMemTable using LoadFromFile (I have for example 20 record).
When I delete a record from the FDMemTable, the RecordCount is decreased but the TListView is not refreshed, it continue to display the 20 records loaded on the LoadFormFile.
If, with the FDMemTable: I .SaveToFile, .Close, and reload with .LoadFromFile, the TListView now display the change.
This is the same behavior if I use the CachedUpdate of FDMemTable or not.
I've tried to call TFDMemTable.Refresh and TListView.Repaint without succes.
Is it possible to call the TListView to refresh his "linked" set of data ?
When I delete a record in the FDMemTable, why no visible refresh occur on the TListView ?
EDIT: I must add a thing, the record is deleted programmatically.
The desired functionality is to delete sone unwanted record in the FDMemTable and display the remaining record to the user with the TListView.
In LiveBindings Designer, by linking the
Synchof theListViewto the*of theFDMemTable, theListViewnow display the resulting record.Also in my last algorithm, because I use
.BeginBatch / .EndBatch(that disable data-aware refreshing), while processing data for removing unwanted record I've to disable the LiveBinding link temporarily (cause I use different sorting index whitin the processing of the data):LinkListControlToField1.Active := false;and "re-link" it after processing:LinkListControlToField1.Active := true;