Skip to content

DevExpress-Examples/blazor-dxgrid-unbound-columns

Repository files navigation

Blazor Grid - Create and edit unbound columns

The Grid allows you to add unbound columns whose values are not stored in the assigned data collection.

Grid with unbound columns

You can calculate column values in two ways:

  • Specify the UnboundExpression property to calculate unbound column values based on other column values. In this example, the TemperatureF column uses this property to fill its cells.
  • Handle the UnboundColumnData event to supply unique column values based on custom logic. In this example, the Summary column uses this event to fill its cells.

You can also implement an editable unbound column. Follow the steps below:

  • Create a derived class from the class that implements your business object.
  • In the derived class, override properties that are used to calculate unbound column values. These overrides should map cell values and the base property.
  • Specify the EditFormTemplate.
  • Handle the CustomizeEditModel event to use derived class for editing.
  • Handle the EditModelSaving event to apply changes to you data source.

Files to Review

Index.razor

Documentation

Create an unbound column

More Examples

Create a ComboBox (Foreign Key) Column

Does this example address your development requirements/objectives?

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

About

Add unbound columns whose values are not stored in the assigned data collection.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •