Hi,
i have a grid where I want to cancel the beforerowupdate event if certain conditions are not met.
The RowUpdateCancelAction is set to CancelUdate which is what I want.
However, when I set e.cancel = true, the row gets updated regardless.
Are there any other settings I need to set?
Thanks,
If you are cancelling BeforeRowUpdate and the row is still getting updated, then something is seriously wrong.
What exactly do you mean when you say the row is "updated regardless"?
What kind of data source are you using?
The datasource for the grid is a collection class which inherits KeyedCollection and implements IBindingList. The collection consists of classes which implement iEditableObject.
will do.
thanks.
Well, I know that BeforeRowUpdate works with data sources like the DataSet, UltraDataSource, List<T> and BindingList<T>. So my first guess here would have to be that there is a problem with your implementation of IBindingList or IEditableObject.
Is the problem occurring for AddNew rows? Or existing rows that have been edited? Or both?
If it's only AddNew rows, then you may need to implement ICancelAddNew.
If it's all rows, then I would try putting breakpoints into the methods of IEditableObject and IBindingList that deal with cancelling updates and step through the code there to make sure everything is working correctly.