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 Reply Children
No Data