Greetings,
I have a TTMSFMXTableView working well. I would like to get it to reload a change I made directly to the underlying dataset.
qryUsers.Edit;
qryUsersLastName.AsString := 'Whatever';
qryUsers.Post;
I have the tableview otherwise working. And I have a TEdit on the same form that I bound to the field and it is updating from my code, but the table is not. I have tried the following:
TableView.Update;
TableView.BeginUpdate and EndUpdate;
qryUsers.DisableControls and EnableControls;
So far no success.
How do I get the tableview to reload?
Thanks!
- Scott
Hi,
I made the change directly to a field in the dataset. Here is a simplified version of the change.
qryUsers.Edit;
qryUsersLastName.AsString := 'Whatever';
qryUsers.Post;
On Post, the TEdit I have connected by LiveBindings updates, but the TMS table view does not reflect the new change unless I rerun the query. Is there a way to force a reload/refresh of the tableview?
- Scott
For now, I am just closing and reopening the query, which works well for a local dataset without too many records. So my current approach is to do the following:
iRecNo : qryUsers.RecNo;
tableviewUsers.BeginUpdate;
qryUsers.Edit;
[editting stuff here]
qryUsers.Post;
qryUsers.Close;
qryUsers.Open;
qryUsers.RecNo := iRecNo;
tableviewUsers.EndUpdate;
This seems to handle the search/filter bar in a reasonable way as well.
My edit and post are a bit smarter and more complicated than above, but this is working now.
- Scott
Hi,
Hi,