Skip to content

khamlyuk/Blazor-grid-inline-editing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataGrid for Blazor - How to implement the inline edit mode with the DisplayTemplate

The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

This example illustrates how to allow users to edit values in the inline edit row.

Data Grid - Inline edit form

The main idea of the solution is to create the DisplayTemplate for each column and display the corresponding value or an editor based on the state of the current row.

The IsInEditMode custom property defines the state of the current row. You can find the implementation of this custom property in the WeatherForecastForEdit class. This class inherits the original WeatherForecast model class and extends it with the IsInEditMode property.

The WeatherForecastForEdit class also implements the INotifyPropertyChanged interface. The Data Grid automatically detects such interfaces and handles the PropertyChanged event to re-render the corresponding row if the corresponding property value changes.

Files to look at

Documentation

More Examples

Releases

No releases published

Packages

No packages published

Languages

  • HTML 52.0%
  • C# 43.8%
  • JavaScript 4.2%