Back to Devexpress

ColumnBase.DisplayMemberBinding Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-e429699f.md

latest2.8 KB
Original Source

ColumnBase.DisplayMemberBinding Property

OBSOLETE

Use the Binding property instead

Gets or sets the binding that associates the column with a property in the data source.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
[Obsolete("Use the Binding property instead")]
public BindingBase DisplayMemberBinding { get; set; }
vb
<Obsolete("Use the Binding property instead")>
<Browsable(False)>
<DefaultValue(Nothing)>
Public Property DisplayMemberBinding As BindingBase

Property Value

TypeDefaultDescription
BindingBasenull

A BindingBase object representing the data binding for the column.

|

Remarks

The DisplayMemberBinding 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.

Note

When working with data structures that contain Dynamic Objects, use the DisplayMemberBinding property instead of ColumnBase.FieldName.

Example

xaml
<dxg:GridControl x:Name="grid">
            <dxg:GridControl.Columns>
                <dxg:GridColumn Header="Id" DisplayMemberBinding="{Binding Path=RowData.Row.Id, Mode=TwoWay}"/>
                <dxg:GridColumn Header="First Name" DisplayMemberBinding="{Binding Path=RowData.Row.FirstName, Mode=TwoWay}"/>
                <dxg:GridColumn Header="Last Name" DisplayMemberBinding="{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

Binding

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace