We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to collapse all the group caption rows in initial rendering of Grid?

This explains that collapsing all Group Caption Rows at initial Rendering of ejGrid.

 

Solution:

We can collapse all the Group Caption Rows at initial rendering using dataBound event and collapseAll method of ejGrid. The dataBound event will be triggered when the grid is bound with data at initial rendering. In this event we have to use collapseAll method to collapse all the group caption rows.

To collapse all the Group Caption Rows during paging we have to use actionComplete event and collapseAll method of ejGrid. The actionComplete event will be triggered for every grid action success event. In this event we need to check the requestType as paging and call the collapseAll method.

The following code example demonstrates how to collapse all Group Caption rows at initial rendering and paging:

JS:

1. Render the Grid Control.

 

MVC:

 

ASP.NET:

 

ASP.NET CORE:

 

Angular:

 

TS File:

For angular platform use ngAfterViewInit event instead of dataBound event

 

JS:

2. In actionComplete and dataBound event we used the collapseAll method of ejGrid to collapse all Grid Rows.

 

Result:

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8308 01/16/2018 07/06/2018 JavaScript ejGrid
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.