Virtual Tree Grid Demo

This sample displays an ordered, flat data source as a tree. Here, a "flat" data source indicates that all rows in the data source will contain the same column and "ordered" implies that no row can be a child of a row with a higher row number. Every row has an indentation value associated with it. Only rows below the given row, having higher indentation values, are considered sub-nodes in the tree for a given row. The first row following the given row, having an indentation value equal to or less than the given rows, will not be treated as a sub-node.

The implementation uses a CollapsibleDataSource class. This class has an array object that holds an array of sample data objects (think of each of these objects as a row in the underlying grid). Each sample data object has an IndentValue property, an ExpandState property, and an Items string array that holds the different column values for the row. If you want to use a virtual tree grid to hold your data, you will have to modify this sample data class to use your data instead of the generic data that is provided.

VirtTreeGrid  screenshot

Features

They provide the basic information about the number of rows and columns, and the values of data.

The Model class handles the serialization requirements for the control and creates the Renderer class. The renderer class handles the UI requirements of the cell, such as drawing and handling mouse actions.