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
60
New object not removed when clicking away from AddRow
posted

Hi,

I have a WinGrid bound to a BindingList containing some objects (class DataObject).

The grid has AllowAddNew set to FixedAddRowOnBotton.

When a click on the AddRow, the BindingLists AddingNew handler is creating a new object, that is displayed in the AddRow. If I now click on one of the other rows, the AddRow is cleared and the new object is removed from the BindingList. This is what I expected.

Now I implement IEditableObject on DataObject, and the grids behaviour changes:

When I click away from the AddRow, the new object is NOT removed from BindingList. Instead CancelEdit() is called (and then EndEdit()), and the object is still displayed in AddRow. There is no longer a * in AddRows RowSelector.

What should I do, to make the grid remove the object from the BindingList, when IEditableObject is implemented? 

Regards,

Klaus

Visual Studio 2008
.NET Framework 2.0
WinGrid ver. 8.2.20082.1000 

 

Parents
  • 469350
    Offline posted

    Hi Klaus,

    If CancelEdit is called, then the object should be cancelled and thus removed from the list. If that item still shows up in the grid, then this is either a bug in the grid, or your implementation of IEditableObject is not correctly cancelling and removing the item - or perhaps it's not sending the proper notifications when this occurrs.

    If you feel that your IEditableObject implementation is correct and that this is a bug in the grid, I recommend that you create a small sample project demonstrating this and Submit an incident to Infragistics Developer Support.

Reply Children