Back to Devexpress

TreeListColumnCollection.Clear() Method

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumncollection-2748b949.md

latest2.5 KB
Original Source

TreeListColumnCollection.Clear() Method

Removes all elements from the collection.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public void Clear()
vb
Public Sub Clear

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Clear() method.

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.

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/GanttItem/GanttItemControlProvider.cs#L96

csharp
gantt.DataSource = null;
gantt.Columns.Clear();
gantt.TreeListMappings.KeyFieldName = gantt.TreeListMappings.ParentFieldName = gantt.ChartMappings.TextFieldName

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/GanttItem/GanttItemControlProvider.vb#L91

vb
gantt.DataSource = Nothing
gantt.Columns.Clear()
gantt.ChartMappings.FinishDateFieldName = String.Empty

See Also

TreeListColumnCollection Class

TreeListColumnCollection Members

DevExpress.XtraTreeList.Columns Namespace