Documents
NextGrid & NextDBGrid
- Integrating Inplace Editors
- Upgrade existing projects for loading changes
- Grid Report Tutorial
- FieldChooser Tutorial
- Using Editors in runtime
- NextGrid How To
- Html Column Tutorial
- NextGrid Slide Style Tutorial
- InputLine Tutorial
- Edit events in NextGrid
- NextGrid Vista Style
NextGrid
- NextGrid Quick Start
- Graphic Column Tutorial
- Optimize NextGrid
- Custom Draw in NextGrid
- VirtualColumn Tutorial
- Export to XML from NextGrid
- NextGrid Custom Sorting
- TreeColumn Tutorial
NextDBGrid
- Sorting records in NextDBGrid
- NextDBGrid Events
- NextDBGrid Quick Start
- NextDBGrid How To
- LookupColumn Tutorial
NextInspector
- NextInspector Item Types
- NextInspector Quick Start
- NextDBInspector Tutorial
- NextInspector Advanced tutorial
- ToolbarItem tutorial
- Map VCL property to item
NextSheet
NextCollection
- NxInfoPanel Tutorial
- Vista Styled Panels
- NxPathControl and NxNotebook tutorial
- NxAlertWindow Tutorial
- NxPathControl Quick Start
- NxButton Tutorial
- NxOutlookBar Tutorial
- NxFlipPanel and NxHeaderPanel Quick Start
- NxPageControl and NxNotebook Quick Start
Misc
- DateTime FormatMask
- NxAutoCompletion Tutorial
- Using NxColorScheme
- NxComboBox styles
- Enable typing unicode characters in InplaceEditors
- NxProgress Tutorial
- NxPreview Quick Start
- Numeric FormatMask
- NxVirtualDataSet tutorial
- Component Names Change
- 32bit Bitmaps Tutorial
- Quick update
Labs
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
and
buttons.ShowLines - Show/Hide Tree Lines.
ShowButtons - Show/Hide
and
buttons.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