Group State Preservation (Kendo Grid) - alight-eskillz/telerik-extensions GitHub Wiki
Important Notes
- Please be sure to review Group State Preservation (Common).
Additional Dependencies
- Telerik Kendo UI Professional
Initialization
Just set groupable: true, and then pass a grid's div element ID to the constructor. You can then allow the extension to automatically save the state, or you can disable the default event handlers (by setting Options.addEventHandlers = false) and manually call methods to save/restore group state. See the grid-specific extension code to see what events are currently monitored and get ideas of how to integrate the extension into your grid if the default handlers are not suitable. See the Group State Preservation (Common) page for more initialization details.
Extension Options
gridClientID: string (Required)
- Simply specify the client ID of your Kendo Grid, which is simply the div element ID to which you attach the Kendo Grid (e.g. pass "grid" to the extension if you initialize the div as a Kendo Grid using $("#grid").kendoGrid(...);).
addEventHandlers: boolean = true
- Set to false if you will manually execute the save/restore events.
saveGridScrollPosition: boolean = false
- Automatically maintain scroll position when grid.ClientSettings.Scrolling.AllowScroll = true
- Note: Telerik's built-in ClientSettings.Scrolling.SaveScrollPosition feature does not work in advanced scenarios (such as dynamic grid height), so this is a great alternative.
gridContainerSelector: string = null
- Must set saveGridScrollPosition = true to enable this option.
- Allows you to specify the grid container JQuery selector.
defaultGroupState__Obf: eSkillz.Extenders.TelerikCustom.GridCommon.GroupStatePreservation.GroupToggleActions = GroupToggleActions.None
- Specify if you want the grid to have a default group expand/collapse state. By default, the Kendo Grid's groups are in the expanded state. Set this option to eSkillz.Extenders.TelerikCustom.GridCommon.GroupStatePreservation.GroupToggleActions.Collapse if you want the opposite.
? TODO: Determine whether the grid's built-in scrolling can be disabled. If not, this sub-option can be removed.