| Visual Basic (Declaration) | |
|---|---|
Public Class DataGridUnboundItemProperty Inherits DataGridItemPropertyBase Implements INotifyPropertyChanged, ICloneable | |
| C# | |
|---|---|
public class DataGridUnboundItemProperty : DataGridItemPropertyBase, INotifyPropertyChanged, ICloneable | |
The following example demonstrates how to use an unbound item property to display a calculated value. In this example, the total value of the units in stock.
| XAML | Copy Code |
|---|---|
Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
The following code provides the implementation of the QueryValue event in which the unbound value will be calculated and returned.
| Visual Basic | Copy Code |
|---|---|
Private Sub DataGridUnboundItemProperty_QueryValue( ByVal sender As Object, ByVal e As DataGridItemPropertyQueryValueEventArgs ) | |
The following code provides the implementation of the QueryValue event in which the unbound value will be calculated and returned.
| C# | Copy Code |
|---|---|
private void DataGridUnboundItemProperty_QueryValue( object sender, DataGridItemPropertyQueryValueEventArgs e ) | |
Unbound data can be "appended" to a data item through the use of unbound item properties, which are represented by the DataGridUnboundItemProperty class. Unlike unbound columns, which can be used to display non-data related information such as a label or controls that allow some sort of action to be carried out, unbound item properties can be used to provide additional data, such as calculated columns (see Example).
Although both the UnboundColumn and DataGridUnboundItemProperty classes both use the term "unbound" they are not meant to be used together.
System.Object
Xceed.Wpf.DataGrid.DataGridItemPropertyBase
Xceed.Wpf.DataGrid.DataGridUnboundItemProperty
Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows Vista; Windows XP Service Pack 2




~325.gif)
Copy Code