Hi team,
I have a datagrid whose datasource is bound to a List<SalesOrders>. What I would like to do here is
1) Add a new row to the grid and update the underlying database table when I click on some kind of commit/save button.
2) Update the database table when I update a cell value and click on some kind of commit/save button.
3) Remove a Row from the grid and update the underlying database table by deleting the corresponding row.
Thanks
Baba
Hello Baba,
Thank you for contacting Infragistics. The first thing to do is change your collection to an IList or ObservableCollection so it supports Add and RemoveAt methods to make your updates easier. Please review my sample attached. It demonstrates how to remove a record by updating the datasource. The same implementation can be applied when adding rows to the datasource via the Add method. The DataGrid doesn't currently support adding and removing records via the UI so as long as your database and collection is updated accordingly and in sync then the grid will push updates automatically. cell-editing.zip
Hi Michael,
I am was looking for something out of the box Datagrid which supports adding/deleting a row from the UI. And yes I already have code which are ObeservableCollections which add/remove values from my entity types.
If you look at the Syncfusion Datagrid they support this feature quite well. Are you guys planning to add this feature in future release of Datagrid?
This is not planned at the moment. Please submit a new product idea on our website and at github @ https://github.com/IgniteUI/igniteui-blazor/issues
https://ko.infragistics.com/community/ideasSubmitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you. Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it.
Let me know if you have any questions.
Michael DiFilippoSoftware DeveloperInfragistics, Inc.
Thank you Michael.