Documents

NextGrid & NextDBGrid

NextGrid

NextDBGrid

NextInspector

NextSheet

NextCollection

Misc

Labs

NextGrid .NET

Working with tree

Related Articles:

Info
  • Skill:
  • Version: 1.0.0
  • Author: Bojan Nikolic
  • Created: 2010-10-14
  • Updated: 2010-10-29
NextGrid.NET is designed to be used in both flat mode as two-dimensional array, and as tree. There are no difference in grid appearance and functionality between this two modes and grid may have one, or unlimited number of child rows.

1. Introducing



When NextGrid.NET is used as "flat" grid, all rows are top-level rows. You may access to cells with using two-dimensional indexer property (e.g. nextGrid1[3, 2].BackColor = Color.Red;), delete, move rows as you have done with ListView.



2. Add child row



As soon we add new row by using AddChildRow() method, grid will contain one second level (child) row. We only need to decide to which row we will attach this child row. This is why AddChildRow method have as parameter absolute index of existing (parent) row.

nextGrid1.AddRow(3); // Add 3 top-level rows
nextGrid1.AddChildRow(1); // Add child row to the 2nd row




3. Tree column



Tree column is a standard column type which may be placed on any position in grid and it may be used any times you need. This column allow user to collapse and expand child rows by clicking on " " and "-" buttons.

Was This Article Useful?

Only constructive comments, code contributions... will be publishes. Questions, non-official discussion will not be published.