Documents
NextGrid & NextDBGrid
- NextGrid How To
- Integrating Inplace Editors
- NextGrid Slide Style Tutorial
- InputLine Tutorial
- FieldChooser Tutorial
- Using Editors in runtime
- Grid Report Tutorial
- Html Column Tutorial
- Upgrade existing projects for loading changes
- Edit events in NextGrid
- NextGrid Vista Style
NextGrid
- Custom Draw in NextGrid
- Export to XML from NextGrid
- Optimize NextGrid
- NextGrid Custom Sorting
- VirtualColumn Tutorial
- Graphic Column Tutorial
- TreeColumn Tutorial
- NextGrid Quick Start
NextDBGrid
- NextDBGrid Events
- NextDBGrid How To
- Sorting records in NextDBGrid
- LookupColumn Tutorial
- NextDBGrid Quick Start
NextInspector
- NextDBInspector Tutorial
- NextInspector Item Types
- Map VCL property to item
- NextInspector Quick Start
- NextInspector Advanced tutorial
- ToolbarItem tutorial
NextSheet
NextCollection
- Vista Styled Panels
- NxPathControl and NxNotebook tutorial
- NxPathControl Quick Start
- NxFlipPanel and NxHeaderPanel Quick Start
- NxOutlookBar Tutorial
- NxPageControl and NxNotebook Quick Start
- NxButton Tutorial
- NxAlertWindow Tutorial
- NxInfoPanel Tutorial
Misc
- NxVirtualDataSet tutorial
- DateTime FormatMask
- NxPreview Quick Start
- 32bit Bitmaps Tutorial
- Quick update
- Enable typing unicode characters in InplaceEditors
- Using NxColorScheme
- NxProgress Tutorial
- NxAutoCompletion Tutorial
- Component Names Change
- NxComboBox styles
- Numeric FormatMask
Labs
NextGrid .NET
TreeColumn Tutorial
Related Articles:
Info
- Skill:
- Version: 1.0.1
- Author: Bojan Nikolic
- Created:
- Updated: 2008-04-22
Please note that Tree Column implementation is still in

Adding TreeColumn
TreeColumn (TNxTreeColumn) is normal NextGrid column and can be added at any place inside Grid, any times needed.
To add one TNxTreeColumn, click on TreeColumn icon:

Customizing TreeColumn
TreeColumn appearance can be customized with following properties:
ExpandLock - Disable clicking on


ShowLines - Show/Hide Tree Lines.
ShowButtons - Show/Hide


Adding Rows
Tree structure can be build with AddChildRow and InsertChildRows methods.
AddChildRow method have following parameters:
Name | Type | Meaning |
---|---|---|
Index | Integer | Index of Parent Row. |
Position (optional) | Integer | Position of Child Row (crFirst - new row will be first child row, crLast - new row will be last child row |
with NextGrid1 do begin AddRow; Cells[0, LastAddedRow] := '[root]'; AddChildRow(0); Cells[0, LastAddedRow] := 'two'; AddChildRow(0); Cells[0, LastAddedRow] := 'one'; AddChildRow(0); Cells[0, LastAddedRow] := 'three'; AddChildRow(LastAddedRow); Cells[0, LastAddedRow] := 'one more child row'; end;
Result:

In this sample we have use property LastAddedRow to determine Index of last added row inside Grid.
Deleting Rows
Child row may be deleted with using DeleteRow method and with sending Row's absolute index as parameter:
DeleteRow(AbsoluteIndexOfRow);
To delete child row, without knowing absolute index, use DeleteChildRow method:
DeleteChildRow(ParentIndex, Index);
Name | Type | Meaning |
---|---|---|
ParentIndex | Integer | Determine absolute index of parent row |
Index | Integer | determine relative index of child row inside Parent row. |
Working with Nodes
NextGrid also have several methods for easy working with Nodes.
GetNextSibling returns the next row (node) in the tree at the same level as the calling row.
GetPrevSibling returns the previous row (node) in the tree at the same level as the calling row.
Comments
2009-10-18 14:51:28
How to find out, which level a selected node is?
2009-10-18 15:01:29
Find it by myself: It's a Row.Property.
But I have a redraw problem with NextGrid - HeaderStyle - hsOffice2007
But I have a redraw problem with NextGrid - HeaderStyle - hsOffice2007
2009-10-18 16:22:31
Hi,
Can you please send me a screenshot , or small demo project of redraw problem on boki@bergsoft.net
Best regards
Can you please send me a screenshot , or small demo project of redraw problem on boki@bergsoft.net
Best regards