Hi, i have a Ultrawingrid bound to a typed datatable.I am doing data validation in initializeRow and then using DataRowView to display the error message/marks.
At the same time , I am also doing some column autofilling based on some other columns input values. (in InitializeRow). Once the user input has been accepted and validated, we send a bunch of server requests and the callback updates the underlying datatable which is bound to the grid. (with thread safety and invokes etc etc)
What I need to do is:
1) Figure out a way so that one column autofilling another one doesn't refire initializeRow
2) Figure out a way to not Fire/Process InitializeRow when the updates are made directly to the underlying DataTable by the callback(Marshalled back onto the UI thread)
I tried using the CellChange Event for the autofilling, but then it doesn't fire on MultiCellPaste and there were some other issues, Still trying to find out if i can really manage to do workarounds #1 and #2
Thanks,
Thanks, that solved it.
You don't have to disable a group. You can do this for a single event also:
grid.EventManager.SetEnabled(GridEventIds.InitializeRow, false);
------ do what you need ------
grid.EventManager.SetEnabled(GridEventIds.InitializeRow, true);
You can do this in the handler itself and actually I think this is the most common use of this feature in order to prevent infinite recursion, and you can do it where you update the data source or anywhere you want.
Yeah, but that grouping is too wide.(Before, after , all).
Is it possible to unhook just InitializeRow while i am
1) in the handler itself
2) where this update to the datasource is happenning
If I understood you right, you're looking for a way to disable the InitializeRow event, so you can use the EventManager to do that. You can disable any event or all of them together before you update the data, and enable them just after that.