Back to Devexpress

DataViewBase.ColumnChooserColumns Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-bb26814b.md

latest2.8 KB
Original Source

DataViewBase.ColumnChooserColumns Property

Gets a collection of hidden columns displayed in the legacy Column Chooser. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(false)]
public ReadOnlyCollection<ColumnBase> ColumnChooserColumns { get; protected set; }
vb
<Browsable(False)>
Public Property ColumnChooserColumns As ReadOnlyCollection(Of ColumnBase)

Property Value

TypeDescription
ReadOnlyCollection<ColumnBase>

A collection of hidden columns displayed in the legacy Column Chooser.

|

Remarks

The ColumnChooserColumns collection stores columns if their BaseColumn.Visible property is set to false , and their BaseColumn.ShowInColumnChooser property is set to true.

The following code sample creates a ListBoxEdit and binds it to the ColumnChooserColumns collection:

xaml
<dxg:GridControl Name="grid">
  <dxg:GridControl.View>
      <dxg:TableView Name="view" ... />
      <dxg:GridControl.Columns>
          <dxg:GridColumn FieldName="Name"/>
          <dxg:GridColumn FieldName="City"/>
          <dxg:GridColumn FieldName="Visits" Visible="False"/>
          <dxg:GridColumn FieldName="Birthday" Visible="False" ShowInColumnChooser="False"/>
      </dxg:GridControl.Columns>
</dxg:GridControl>
<GroupBox Header="Column Chooser Columns">
    <dxe:ListBoxEdit ItemsSource="{Binding ColumnChooserColumns, ElementName=view}" 
                     DisplayMember="FieldName"/>
</GroupBox>

Refer to the Show and Hide Columns topic for more information.

See Also

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace