Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
UltraGrid.UpdateMode and BindingList<T> data source
posted

Hello all,

 I have a regular dropdown list (WinForms) with a BindingList<T> as its data source and I want to edit the dropdown's items usign the UltraGrid (8.3). I want also to commit the changes (changed item names, new items added, items removed) if I press a "save" button only (it would be nice to have a "reset" functionality here in order to cancel all the changes).

In order to achive this, I use the same data source for both, the dropdown list and the ultragrid (so the ultragrid gets a BindingList<T> object). The problem is that once the edited cell is left, the corresponding datasource item is updated and there is no way to restore it to its original value.

I execute this code for the "commit" button:

this.ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);

this.ultraGrid1.UpdateData();

having this property set:

this.ultraGrid1.UpdateMode = UpdateMode.OnUpdate;

How should I proceed in order to make it work as I described?

Thanks!

Parents Reply Children
No Data