Sandy
Sandy

Reputation: 2449

How to collapse kendo grid to headers?

I have strange requirement. I was asked to collapse all data rows of a Kendo grid to its header. I know to collapse to groups. But this seems strong suggestions to achieve.

Below is the proposed Kendo Grid, with an arrow in the header. Once click on the arrow, all the rows should collapse to header. By default this should be in collapsed state.

Kendo Grid

Please throw some lights on me to solve this.

Upvotes: 0

Views: 1346

Answers (1)

The Dread Pirate Stephen
The Dread Pirate Stephen

Reputation: 3169

Something like this?

http://dojo.telerik.com/@Stephen/iJAve

The key is the hiding/showing of the k-grid-content div and then adjusting the height of the grid to compensate so that the borders don't remain at the original, uncollapsed location.

Now, this is a simple grid without paging, grouping, virtual scrolling, frozen columns, etc.
If you have those elements, then the divs that need to be hidden may change based on the different element layout that kendo uses to provide the functionality.

Upvotes: 2

Related Questions