The Grid allows you to add unbound columns whose values are not stored in the assigned data collection.
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.