wpf-devexpress-dot-xpf-dot-grid-dot-treelistcontrol-122f1d65.md
Provides access to the column collection.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public TreeListColumnCollection Columns { get; }
Public ReadOnly Property Columns As TreeListColumnCollection
| Type | Description |
|---|---|
| TreeListColumnCollection |
A TreeListColumnCollection object that is a collection of columns within the control.
|
The TreeList stores its columns within the Columns collection. This collection provides methods that allow you to add new and remove existing columns. Individual columns are specified by TreeListColumn objects, and can be accessed using indexed notation or by the field name (ColumnBase.FieldName).
To access only visible columns whose BaseColumn.Visible property is set to true , use a view’s TreeListView.VisibleColumns property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Columns property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/MainWindow.xaml#L47
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn Header="Examples" FieldName="RegionName" AllowEditing="False" AllowBestFit="True" AllowDrop="False" AllowSearchPanel="False" />
wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/MainWindow.xaml#L47
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn Header="Examples" FieldName="RegionName" AllowEditing="False" AllowBestFit="True" AllowDrop="False" AllowSearchPanel="False" />
wpf-richedit-document-api/CS/DXRichEditControlAPISample/MainWindow.xaml#L52
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn Header="Examples" FieldName="RegionName" AllowEditing="False" AllowBestFit="True" AllowDrop="False" AllowSearchPanel="False" />
wpf-tree-list-generate-node-summaries-from-collection/CS/TreeList_DataBinding/MainWindow.xaml#L24
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name"/>
wpf-tree-list-display-node-summaries/CS/TreeList_DataBinding/MainWindow.xaml#L17
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name"/>
See Also