LyteNyte Grid logo for light mode. Links back to the documentation home page.
Server Data Loading

Unbalanced Rows (Tree Data)

Use the server data source to handle unbalanced hierarchies and load hierarchical data on demand.

Hierarchical data can include leaf rows at varying depths, a common pattern in NoSQL databases. LyteNyte Grid supports these unbalanced hierarchies.

Server Tree Data Display

LyteNyte Grid’s server data source renders the rows returned by the server, not the models defined in the grid state. For example, if the row group model defines four grouping levels, the grid does not force every row to expand four times to reach a leaf node.

The server data source can display tree data of any depth, provided the server’s data representation stays consistent across requests and responses.

The demo demonstrates this by creating a tree with varying branch depths. It does not use row groups, but the same pattern applies.

Unbalanced Rows

Fork code on stack blitzFork code on code sandbox

This is one way to handle unbalanced hierarchies. Another common approach collapses row groups with a single child. The server interprets state, and LyteNyte Grid renders the rows it returns.

Next Steps