Skip to content

Infragistics Community Forum / Web / Ignite UI for Blazor / Adding rows to Blazor Data grid

Adding rows to Blazor Data grid

New Discussion
Baba Goud Gadiga
Baba Goud Gadiga asked on Jan 31, 2022 6:07 PM

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

Sign In to post a reply

Replies

  • 0
    Michael DiFilippo
    Michael DiFilippo answered on Jan 28, 2022 5:24 PM

    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_2D00_editing.zip

    • 0
      Baba Goud Gadiga
      Baba Goud Gadiga answered on Jan 31, 2022 5:39 PM

      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?

      Thanks

      Baba

      • 0
        Michael DiFilippo
        Michael DiFilippo answered on Jan 31, 2022 5:51 PM

        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

        Submitting 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 DiFilippo
        Software Developer
        Infragistics, Inc.

      • 0
        Baba Goud Gadiga
        Baba Goud Gadiga answered on Jan 31, 2022 6:07 PM

        Thank you Michael.

        Thanks

        Baba

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Baba Goud Gadiga
Favorites
0
Replies
4
Created On
Jan 31, 2022
Last Post
4 years, 2 months ago

Suggested Discussions

Tags

Created by

Created on

Jan 31, 2022 6:07 PM

Last activity on

Feb 23, 2026 8:02 AM