Example of Grouping in Javascript Data Grid Control


This sample demonstrates grouping feature of the Grid component. In this sample, the Grid data is grouped against ShipCountry column. To group any other column simply drag the column header and drop on the group drop area.

More Details...


The Grid control has options to group the records based on the required column. When grouping is applied, grouped records are organized into a hierarchical structure to facilitate easier expansion and collapse of records. To enable grouping, set allowGrouping property as true. Columns can be grouped by simply dragging the column header and drop on the group drop area. In this demo, to group a specify column, drag and drop the column in the group drop area. Injecting Module: Grid features are segregated into individual feature-wise modules. To use grouping and editing features, we need to inject Group, Edit module using Grid.Inject(Group) and Grid.Inject(Edit) method. In this demo, editing options can be enabled by setting editSettings.allowEditing as true. You can start editing by double-clicking a row or the toolbar `Edit` button. Once in edit mode, you have the ability to modify the values of the selected row. When saving the record, the Grid will refresh the specific edited row without affecting the expanded group state. More information on the grouping feature configuration can be found in this documentation section.