DevExpress-Examples / blazor-dxgrid-post-changes-to-data-source

Update all field values of an in-memory data record.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grid for Blazor - How to post changes to an in-memory data source

When a user starts editing a row, our Blazor Grid (DxGrid) creates an edit model - a copy of the processed data item. This model stores all changes while the original data item remains intact. You need to update the data source to save changes. This example uses the AutoMapper library to update all field values of an in-memory data record.

Blazor DxGrid instantly update all fields of the processed data item

The EditModelSaving event fires when a user completes row edits and allows you to save changes. Use the event argument's EditModel property to access the edit model. The DataItem property allows you to access the proccessed data item as requirements dictate.

Install the AutoMapper library and call its Map method to assign all edit model field values to corresponding data item fields simultaneously.

Files to Review

Documentation

More Examples

About

Update all field values of an in-memory data record.

License:Other


Languages

Language:C# 68.3%Language:HTML 31.7%