The AgDataGrid in v2010.1 will introduce a new set of features to work with unbound columns. Now, it was possible to do unbound or calculated columns before but the approaches used to accomplish those had limitations.
For example you could add a “calculated field” (a.k.a a Read only property) to your data objects but you loose the flexibility to customize the value at runtime and, you start bloating your data objects with unnecessary logic. You could also override how the value is to be displayed but by doing so, you loose the ability to perform sorting, grouping and filtering on that ”new” display value.
The AgDataGrid in v2010.1 gives you a new CustomUnboundColumnData event where you can set a value for the cell and a new AgDataGridColumn.UnboundExpression where you can specify an expression to calculate the value. For example suppose you have a Parts table with Columns like Part ID, Part Name, Quantity, Price. And you want to display the Total Cost in the grid as Price * Quantity.
<dxg:AgDataGrid>
<dxg:AgDataGrid.Columns>
<dxg:AgDataGridColumn FieldName="PartID"/>
<dxg:AgDataGridColumn FieldName="Price"/>
<dxg:AgDataGridColumn FieldName="Quantity"/>
<dxg:AgDataGridColumn FieldName="Total" UnboundExpression="[Price] * [Quantity]"/>
</dxg:AgDataGrid.Columns>
</dxg:AgDataGrid>
The Grid will also have a build-in expression editor so you can let your end-users do it themselves.
Cheers,
Azret