run-time toggling of visibility of column(s) in a grid

1 Answer 63 Views
Grid View
Mike
Top achievements
Rank 1
Mike asked on 13 Oct 2022, 06:47 PM | edited on 14 Oct 2022, 02:13 PM

I have a grid that has a column that should only be shown if a user selects an option on the view (default is set to hidden). 

Is there a standard way to toggle the visibility of a column dynamically via javascript? 

Mike
Top achievements
Rank 1
commented on 31 Oct 2022, 08:06 PM | edited

disregard...wrong thread.

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 18 Oct 2022, 01:14 PM

Hello Phil,

The Grid has two client-side API methods that can be used to show/hide a column: showColumn and hideColumn. To specify which column to be shown/hidden, you pass the index of the column or the name of the field it is bound to.

Regards,
Ivan Danchev
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 View
Asked by
Mike
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or