Hi,
I'm using TUniQuery (name UniQuery) and attach a DBGrid to it. Place a button (name btnChange, default Enabled = FALSE) on the form and attach it to an action with expression "btnChange.enabled := UniQuery.modified". I delete some records in DBGrid, expecting this will trigger the btnChange to be enabled but, no reaction takes place. How to make the idea works? Thank you in advance..
(*edit:
CachedUpdates = TRUE
LocalUpdate = TRUE
*)
TUniQuery: delete record does not set modified property?
Hello,
The Modified property indicates changes in the current record, but not in all DataSet, i.e., if you make changes to some record and repeat this property in, for example, the BeforePost event, it will be True, and if you delete a record, the value of this property will not change.
To change the button state on delete, you can add the following code to the AfterDelete event of the UniQuery component:
The Modified property indicates changes in the current record, but not in all DataSet, i.e., if you make changes to some record and repeat this property in, for example, the BeforePost event, it will be True, and if you delete a record, the value of this property will not change.
To change the button state on delete, you can add the following code to the AfterDelete event of the UniQuery component:
Code: Select all
btnChange.enabled:= true;Hi Alex,
Thanks for the reply and solution, it's working now!
Actually, I was trying to mimic some ClientDataset features and wondering if it is possible to do with Unidac alone. Those features such as
Changecount, Undolastchange, Aggregates, etc, which are very useful for dataset editing navigation and control.
Thanks for the reply and solution, it's working now!
Actually, I was trying to mimic some ClientDataset features and wondering if it is possible to do with Unidac alone. Those features such as
Changecount, Undolastchange, Aggregates, etc, which are very useful for dataset editing navigation and control.
Hello,
Thank you for the information.
You can add your suggestions concerning implementing new functionality at our UserVoice page at http://devart.uservoice.com/forums/1046 ... 939-unidac . If enough people votes for your suggestions, they will be implemented.
Thank you for the information.
You can add your suggestions concerning implementing new functionality at our UserVoice page at http://devart.uservoice.com/forums/1046 ... 939-unidac . If enough people votes for your suggestions, they will be implemented.