private void vtItems_OnGetNodeCellText(VirtualTreeView.VirtualTreeView tree, VirtualTreeNode node, int column, out string cellText) { var n = vtItems.GetNodeData <NodeData>(node); switch (column) { case 0: cellText = (n.num).ToString(); break; default: cellText = n.name; break; } }
private void vtItems_OnCompareNode(VirtualTreeView.VirtualTreeView tree, VirtualTreeNode node1, VirtualTreeNode node2, int column, out int result) { var n1 = vtItems.GetNodeData <NodeData>(node1); var n2 = vtItems.GetNodeData <NodeData>(node2); if (column == 0) { result = n1.num - n2.num; } else { result = string.Compare(n1.name, n2.name); } }
private void vtItems_OnHeaderClick(VirtualTreeView.VirtualTreeView tree, int column) { if (column == 0) { if (sd == SortDirection.sdAscending) { sd = SortDirection.sdDescending; } else { sd = SortDirection.sdAscending; } tree.SortTree(column, sd); } }
/// <summary> /// Initializes a new instance of the <see cref="ItemsSourceHierarchicalSource"/> class. /// </summary> /// <param name="source">The source.</param> /// <param name="treeView">The tree view.</param> public ItemsSourceHierarchicalSource(IEnumerable source, VirtualTreeView treeView) { _treeView = treeView; Source = source; }
public Editor(VirtualTreeView tree, VirtualTreeNode node, int column) { FTree = tree; FNode = node; FColumn = column; }
public DateEditor(VirtualTreeView tree, VirtualTreeNode node, int column) : base(tree, node, column) { var edit = new DateTimePicker(); setEdit(edit); }
public TextEditor(VirtualTreeView tree, VirtualTreeNode node, int column) : base(tree, node, column) { var edit = new TextBox(); setEdit(edit); }