windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumncollection-0aaddf38.md
Gets the number of elements actually contained in the collection.
Namespace : DevExpress.XtraTreeList.Columns
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
public int Count { get; }
Public ReadOnly Property Count As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value that specifies the number of elements actually contained in the collection.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Count 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-copy-nodes-to-another-treelist/CS/CopyNodesExample/MainForm.cs#L42
private TreeListNode CopyNode(TreeListNode sourceNode, TreeListNodes targetNodes) {
int columnCount = sourceNode.TreeList.Columns.Count;
object[] values = Enumerable.Range(0, columnCount).Select(x => sourceNode.GetValue(x)).ToArray();
for(int i = 0; i < gantt.Columns.Count; i++) {
var column = gantt.Columns[i];
winforms-treelist-customize-node-menu/CS/Form1.cs#L21
new DevExpress.XtraTreeList.Design.XViews(treeList1);
for(int i = 1; i < treeList1.Columns.Count; i++)
treeList1.Columns[i].Visible = false;
winforms-treelist-copy-nodes-to-another-treelist/VB/CopyNodesExample/MainForm.vb#L45
Private Function CopyNode(ByVal sourceNode As TreeListNode, ByVal targetNodes As TreeListNodes) As TreeListNode
Dim columnCount = sourceNode.TreeList.Columns.Count
Dim values As Object() = Enumerable.Range(0, columnCount).[Select](Function(x) sourceNode.GetValue(x)).ToArray()
For i As Integer = 0 To gantt.Columns.Count - 1
Dim column = gantt.Columns(i)
winforms-treelist-customize-node-menu/VB/Form1.vb#L22
Dim tmp_XViews = New Design.XViews(treeList1)
For i As Integer = 1 To treeList1.Columns.Count - 1
treeList1.Columns(i).Visible = False
See Also
TreeListColumnCollection Class