Back to Devexpress

TreeListColumn.Visible Property

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumn-40037632.md

latest6.2 KB
Original Source

TreeListColumn.Visible Property

Gets or sets whether the column is visible.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
[XtraSerializablePropertyId(3)]
public virtual bool Visible { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
<XtraSerializablePropertyId(3)>
Public Overridable Property Visible As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the column is visible; otherwise, false.

|

Remarks

If the Visible property is set to true , the column is visible within the Tree List. The position at which it’s displayed within the column header panel is specified by the TreeListColumn.VisibleIndex property. Otherwise, if the Visible property is set to false , the column is invisible. In this instance, the column’s header is displayed within the Customization Form, provided that the column’s TreeListOptionsColumn.ShowInCustomizationForm option is enabled.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible 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.

winforms-treelist-create-file-manager-drag-drop-files-folders/CS/FileList/FileListHelper.cs#L52

csharp
this.treeListColumn2.VisibleIndex = 0;
this.treeListColumn2.Visible = true;

xaf-win-gantt-control/CS/XPO/GanttSolutionXPO/GanttSolutionXPO.Win/Editors/CustomGanttEditor.cs#L71

csharp
ganttColumn.Name = column.PropertyName + "Column";
ganttColumn.Visible = true;
ganttColumn.SortIndex = column.SortIndex;

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

csharp
column.Visible = true;

winforms-treelist-unbound-columns/CS/TreeList_UnboundDataViaEvent/Form1.cs#L28

csharp
unbColumnMarchChange.UnboundType = DevExpress.XtraTreeList.Data.UnboundColumnType.Decimal;
unbColumnMarchChange.Visible = true;
unbColumnMarchChange.OptionsColumn.AllowEdit = false;

winforms-treelist-customize-node-menu/CS/Form1.cs#L22

csharp
for(int i = 1; i < treeList1.Columns.Count; i++)
        treeList1.Columns[i].Visible = false;
}

winforms-treelist-create-file-manager-drag-drop-files-folders/VB/FileList/FileListHelper.vb#L50

vb
treeListColumn2.VisibleIndex = 0
treeListColumn2.Visible = True
treeListColumn3.Caption = "Type"

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

vb
column.Visible = True

winforms-treelist-unbound-columns/VB/TreeList_UnboundDataViaEvent/Form1.vb#L23

vb
unbColumnMarchChange.UnboundType = DevExpress.XtraTreeList.Data.UnboundColumnType.Decimal
unbColumnMarchChange.Visible = True
unbColumnMarchChange.OptionsColumn.AllowEdit = False

winforms-treelist-customize-node-menu/VB/Form1.vb#L23

vb
For i As Integer = 1 To treeList1.Columns.Count - 1
    treeList1.Columns(i).Visible = False
Next

See Also

VisibleIndex

VisibleColumns

Visible

TreeListColumn Class

TreeListColumn Members

DevExpress.XtraTreeList.Columns Namespace