ColumnBase.Binding Property
In This Article
Gets or sets the binding that associates the column with a property in the data source.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.Core.dll
#Declaration
#Property Value
Type | Default | Description |
---|---|---|
Binding |
null |
A Binding |
#Remarks
The Binding property allows a column to specify a property of the grid control's DataControlBase.ItemsSource to bind to. Note that the data source should implement INotifyPropertyChanged to notify the grid control that a property value has changed.
The attributes-based validation does not work when using the Binding property.
NOTE
When working with data structures that contain Dynamic Objects, use the Binding property instead of Column
#Example
<dxg:GridControl x:Name="grid">
<dxg:GridControl.Columns>
<dxg:GridColumn Header="Id" Binding="{Binding Path=RowData.Row.Id, Mode=TwoWay}"/>
<dxg:GridColumn Header="First Name" Binding="{Binding Path=RowData.Row.FirstName, Mode=TwoWay}"/>
<dxg:GridColumn Header="Last Name" Binding="{Binding Path=RowData.Row.LastName, Mode=TwoWay}"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView Name="View" ShowAutoFilterRow="True" NewItemRowPosition="Top" AllowPerPixelScrolling="True"/>
</dxg:GridControl.View>
</dxg:GridControl>
See Also