P
Phillip
I have a DataGrid bound to a custom collection that
implements IBindingList. The collection returns true for
AllowNew. The collections AddNew() method creates a new
object, adds it to the collection and returns the new
object.
The SupportsChangeNotification property returns true and
the appropriate ListChangedEventArgs are used in the
ListChanged event. All fine no problem. However:
If there are items in the collection, and therefore items
in the DataGrid, when the AddNew() method of the
collection is called, all is well and the datagrid adds a
new blank row bound to the new object. Super.
If however the collection is empty, and therefore no rows
in the DataGrid, when AddNew() method of the collection is
called, the DataGrid responds by adding a new row, but
with no columns. Just a tiny bit of white on the left hand
side of the area where the columns are supposed to be.
I have tried calling Invalidate and refresh on the Grid
but this has not helped.
Any help would me most appreciated.
Many thanks
Phillip.
implements IBindingList. The collection returns true for
AllowNew. The collections AddNew() method creates a new
object, adds it to the collection and returns the new
object.
The SupportsChangeNotification property returns true and
the appropriate ListChangedEventArgs are used in the
ListChanged event. All fine no problem. However:
If there are items in the collection, and therefore items
in the DataGrid, when the AddNew() method of the
collection is called, all is well and the datagrid adds a
new blank row bound to the new object. Super.
If however the collection is empty, and therefore no rows
in the DataGrid, when AddNew() method of the collection is
called, the DataGrid responds by adding a new row, but
with no columns. Just a tiny bit of white on the left hand
side of the area where the columns are supposed to be.
I have tried calling Invalidate and refresh on the Grid
but this has not helped.
Any help would me most appreciated.
Many thanks
Phillip.