We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

inline edit add new row ObservableCollection

Hi

I want to use a grid like in your demo Observable Collection databinding Demo but instead of using buttons to add new items I want to use inline editing do I need to do something to get this working.

My problem now is I get 1 empty row but wen I edit it no empty row gets added is this normal behaviour?

Is there a ObservableCollection demo with inline Crud behaviour so without the add, edit and delete button?


3 Replies

TV Thangapriya V Syncfusion Team February 7, 2013 12:20 PM UTC

Hi Steve,

 

We have analyzed your query. We have achieved your requirement at sample level. And we have attached the sample below.

 

Please refer the following link for further details.

http://help.syncfusion.com/ug/wpf/grid/default.htm#!documents/tableoptions.htm

 

Please let us know if you have any concerns.

 

Regards,

Thangapriya



Observable collection Add Edit Delete_b2e70aae.zip


PM Paul McCranie March 21, 2013 07:37 PM UTC

In your example, yes, you can Add a new row, but that record isn't being stored. It's lost whenever you close the grid.

Which is the same behavior I'm getting. It adds it to the grid temporarily, but it doesn't actually persist back to the data store.

How do you get it to persist?

Paul


DA Divya A Syncfusion Team May 14, 2013 06:41 AM UTC

 

Hi Paul,

 

Sorry for the delay caused.

 

Whenever you edit, add or delete a record in the GridDataControl, the values will be changed only in ItemsSource of the Grid. It will  not reflect the changes to DataBase. You can use any of your approach to Commit the changes back to the DataBase or using update() method of DataAdapter. So that the changes would persist permanently.

 

Regards,

Divya.


Loader.
Live Chat Icon For mobile
Up arrow icon