groupPanel

Configures the group panel.

Type:

Object

Data in DataGrid can be grouped by one column or by several. Once a column is used for grouping, it is added to the group panel.

By default, the group panel is hidden. To make it visible, set the groupPanel.visible option to true. Alternatively, the visibility of the group panel can depend on the device's screen size. To accomplish this behavior, set the visible option to "auto".

In case you need to show the group panel, but make it irresponsive, assign false to the groupPanel.allowColumnDragging option. This is useful, for instance, when grid records are grouped initially and when the user needs to know about that grouping, but must not be able to change it.

See Also

View Demo

Show Example:
AngularJS
Knockout
jQuery

In this example, grid records are initially grouped by the Format column. In addition, the group panel is made visible using the groupPanel.visible option. However, the capability to drag columns onto and from the group panel is disabled by setting the groupPanel.allowColumnDragging option to false. Thus, a user can only see how grid records are grouped, but cannot change the initial grouping.


                                    

                                    

In this example, grid records are initially grouped by the Format column. In addition, the group panel is made visible using the groupPanel.visible option. However, the capability to drag columns onto and from the group panel is disabled by setting the groupPanel.allowColumnDragging option to false. Thus, a user can only see how grid records are grouped, but cannot change the initial grouping.


                                    

                                    

In this example, grid records are initially grouped by the Format column. In addition, the group panel is made visible using the groupPanel.visible option. However, the capability to drag columns onto and from the group panel is disabled by setting the groupPanel.allowColumnDragging option to false. Thus, a user can only see how grid records are grouped, but cannot change the initial grouping.


                                    

                                    

allowColumnDragging

Specifies whether columns can be dragged onto or from the group panel.

Type:

Boolean

Default Value: true

When the group panel is visible, the user can drag and drop columns onto/from it. However, some scenarios require the group panel to be irresponsive. For example, if you have grouped data initially and do not need this grouping to be changed by the user, yet you want the user to be aware of it. In such cases, set the allowColumnDragging option to false.

Show Example:
AngularJS
Knockout
jQuery

In this example, you can block the group panel to prevent grid columns from being dragged onto it. The column dragging capability is controlled by the groupPanel.allowColumnDragging option. When this option equals true, grid columns can be dragged onto and from the group panel; when false, they cannot. You can change the value of the aforementioned option at runtime using the check box under the grid.


                                    

                                    

In this example, you can block the group panel to prevent grid columns from being dragged onto it. The column dragging capability is controlled by the groupPanel.allowColumnDragging option. When this option equals true, grid columns can be dragged onto and from the group panel; when false, they cannot. You can change the value of the aforementioned option at runtime using the check box under the grid.


                                    

                                    

In this example, you can block the group panel to prevent grid columns from being dragged onto it. The column dragging capability is controlled by the groupPanel.allowColumnDragging option. When this option equals true, grid columns can be dragged onto and from the group panel; when false, they cannot. You can change the value of the aforementioned option at runtime using the check box under the grid.


                                    

                                    

emptyPanelText

Specifies text displayed by the group panel when it does not contain any columns.

Type:

String

Default Value: 'Drag a column header here to group by that column'

Show Example:
AngularJS
Knockout
jQuery

In this example, you can place a required text into the empty group panel. Type your text in the text box under the grid. After that, make the text box lose focus by clicking the surrounding area. The typed text will be assigned to the groupPanel.emptyPanelText option and appear in the empty group panel.


                                    

                                    

In this example, you can place a required text into the empty group panel. Type your text in the text box under the grid. After that, make the text box lose focus by clicking the surrounding area. The typed text will be assigned to the groupPanel.emptyPanelText option and appear in the empty group panel.


                                    

                                    

In this example, you can place a required text into the empty group panel. Type your text in the text box under the grid. After that, make the text box lose focus by clicking the surrounding area. The typed text will be assigned to the groupPanel.emptyPanelText option and appear in the empty group panel.


                                    

                                    

visible

Specifies whether the group panel is visible or not.

Type:

Boolean

|

String

Default Value: false
Accepted Values: 'auto'

The group panel is hidden by default. To make it visible, assign true to groupPanel.visible option. Additionally, the group panel includes the "auto" mode, in which the visibility of the group panel relies on the device's screen size. On small-screen devices, the group panel will be hidden; on the others - shown.

When using the widget as an ASP.NET MVC Control, you can specify this option using the Mode enum that accepts the value Auto.

Show Example:
AngularJS
Knockout
jQuery

In this example, you can change the visibility of the group panel at runtime using the check box under the grid.


                                    

                                    

In this example, you can change the visibility of the group panel at runtime using the check box under the grid.


                                    

                                    

In this example, you can change the visibility of the group panel at runtime using the check box under the grid.