This sample demonstrates reordering feature of the Tree Grid columns. Select column name and index from properties panel to reorder the columns. You can also reorder columns by simply drag and drop in the desired column position.
Task ID | Task Name | Start Date | Duration | Progress |
---|---|---|---|---|
No records to display |
Column | |
Column Index |
Reordering can be enabled by setting allowReordering
property as true. Reordering can be done by drag and drop the column header from one index to another index within the Tree Grid.
The location in which the column to be placed, will be indicated by two arrows symbols.
In this demo, you can either reorder columns by drag and drop or by selecting column name and column index from the dropdown to reorder the columns.
Injecting Module:
Tree Grid component features are segregated into individual feature-wise modules. To use reordering feature, we need to inject ReorderService
into the @NgModule.providers
section.
More information about Column Reorder can be found in this documentation section.