Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Blazor DxGrid instantly updates 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.

Use one of the following variants to save changes made in the edit model:

  • Call the CopyChangesToDataItem method.
  • 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

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •