This is a migrated thread and some comments may be shown as answers.

Expand/Collapse Column for Kendo Grid in MVC

1 Answer 978 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 04 Nov 2020, 02:33 PM

Hello. I am trying to find a way to Expand/Collapse columns for a Kendo Grid in MVC. I see this implementation for js:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-expand-collapse-columns-group-button-click

But I would like to find the same functionality example for MVC please.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 06 Nov 2020, 10:21 AM

Hello Kevin,

The approach for MVC Grid is absolutely the same as in the article you have provided. Namely:

- It uses HeaderTemplate to set the hide/expand button

- hideColumn() and showColumn() methods are used i nthe button onClick event handler.

For your convenience, I have prepared a small MVC demo demonstrating this. Please find it attached to my reply.

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or