Could anybody tell me how can i capture when the CurrentState of the grid changes,
Is it possible with a databinding? i have tried it but i get an error : 'CurrentStat' is readonly
thx
Yes, i think so, i think i will try to catch some events like BeforeRowsDeleted , AfterExitEditMode, AfterRowUpdate , ...
Thank you for your point of view.
There are lots of other events in the grid that fire when you perform these sorts of actions, but there's really no one single event you can use, except maybe PropertyChanged. But that would probably not be a good idea because the code to determine what changed would be extremely complex. You would be much better off trapping multiple events in my opinion.
I want to put the code which will control the state of my form (editing, deleting, inserting new values) into an inherited ultragrid, i mean , when the user modifies a cell the grid will detect that the current state of the grid is RowDirty and InEditMode (or similar), when the user filters the grid and puts the focus in the filter row the grid will notify to the form that the ActiveRow can not be deleted, so i will disable the button of delete.
So that's why i want to track changes on the CurrentState property of the grid, the form will update the enabled property of its buttons depending on the currentstate of the grid.
I have seen a demo project in the infragistics samples which comes with the installation, where there is a timer which is keeping track of the currentstate but i think that's not the best way.
I don't think there's an event for this, except maybe the PropertyChanged event. What exactly are you trying to track here?