Data Binding and Unbound Columns
Powered by our shared data management framework, the XtraGrid Suite breaks the traditional limits of dataset only based control libraries. With the XtraGrid, you never need to keep unnecessary data in your objects, because the grid allows you to handle bound and unbound data simultaneously. You don't have to populate your data sources with tons of nested records, since the XtraGrid allows you to easily handle large master-detail datasets via dynamic detail loading. And you don't have to worry about choosing the 'right' data source type. With our shared data framework, you don't sacrifice data processing performance as a result of the data binding method you've chosen.
Data Binding Options
All the objects that support the IList, ITypedList, IListSource and IBindingList interfaces can serve as the data source for the grid control. This means the grid can display any data - from data tables supplied by .NET Data Providers or load them from XML files...to any collection of custom objects.
The grid control also offers various methods to bind master-detail data - from automatic detail recognition to adapting any data source to a master-detail format.
-
If the grid's data source is a DataTable or DataView class, child relationships are automatically recognized.
-
If the grid's data source is an object that has IList properties, these lists are automatically recognized as details.
- Master-detail data can be even stored in separate objects not linked to one another.
- You can create any master-detail relationship and supply detail data by handling a set of events in the master view. This allows you to create and populate details with data on the fly. This approach is extremely useful when creating hierarchical data browsers such as file or registry browsers.

Unbound Columns
All data Views that ship with the XtraGrid allow you to create unlimited number of unbound columns. These are columns that don't have an associated field within the data source and allow manual data population. Thus, you can provide additional data visualization or management options to your end-users without having unnecessary columns in your data source.
Unbound columns give you all the features found in bound columns. They can be involved in sorting, grouping, filtering, and summary calculations - everything that can be accomplished against bound columns. You can even populate unbound columns with values calculated from bound columns. A final capability available to you when using unbound columns is the ability to edit unbound data. This can be useful in cases when the unbound column's data should not reside within the grid's actual data source or cannot reside within it due to the structure incompatibilites. A good example is maintaining a list of records that require additional processing at a later point in time. To create and maintain an unbound column, you need to take the following simple steps:
-
Set the column's UnbondType property to the appropriate data type. You can choose from Boolean, Integer, Decimal, Date-Time, String and Object types.
-
Handle the view's CustomUnboundColumnData event to provide data to your unbound column and perform the required actions when users change the unbound data.

Expression Editor Dialog
Once you've added an unbound field, you can build a formula to be used for value calculations. To make it easier to build these formulas, we've created an advanced and easy-to-use Expression Editor dialog. With this dialog, you can construct any expression that uses other field values and any constants. 
For unbound columns, you can also enable the end-user customization of expressions. Simply enable an appropriate option and the column's header menu will include a link to the Expression Editor. 
'How to' Video: WinForms Grid - How to Use the Expression Editor
|