Hi,
I have been using the examples from this thread
the update and delete examples are working fine, but the adding example doesn't work.
I get a NullReferenceException
And by the way, doing it that way will just create a new empty item, which has to be edited.
So my question is:
Isn't it possible to just add a new empty row to the grid in edit-mode, when you push a ADD button ?
HI,
I could not reproduce your issue using the sample referred to in the Thread.
You should find out what causing the NullReference exception. It could be that you just have not set your datasource.
If you are going to add data to the grid not using the UI, it is best to simply add it to the collection the XamGrid is bound to.
I know what causes the NullReference exception.
I am not using a observableCollection, so casting it to observableCollection gives a nullReference exeption.
And the dataSource is also set, you could see that on the images I created that there is 22 items.
I want to use the UI, I just don't want it to be enabled all time.
So the question is again, isn't it possible to just add a new row to the grid without any items when pushing a button ?
Hi again,
I figured it out.
XamGrid.AddNewRowSettings.AllowAddNewRow = AddNewRowLocation.Top
is doing the job :D