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

Select columns in Kendo Grid

3 Answers 1134 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Salim
Top achievements
Rank 1
Salim asked on 18 Jul 2018, 05:42 AM
Is there an option to select a column in kendo Grid?

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 18 Jul 2018, 11:21 AM
Hello Salim,

No, the Kendo UI Grid currently only supports row selection.

https://www.telerik.com/kendo-angular-ui/components/grid/selection/

A possible workaround would be to not use the built in selection functionality and attach a handler to the cellClick event of the Grid. In the event handler you could add/remove a CSS class dynamically to simulate column selection. Here is an example that demonstrates this in action. You could use it as a base and modify further if needed:

https://plnkr.co/edit/oVO5WMU5bIUldncmiboA?p=preview

Regards,
Dimiter Madjarov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Salim
Top achievements
Rank 1
answered on 19 Jul 2018, 07:06 AM
Do we have an event on Header cell click ?
0
Dimiter Madjarov
Telerik team
answered on 19 Jul 2018, 08:21 AM
Hello Salim,


The cellClick event is fired when clicking on dataItem cells only. Regarding the header, you could specify a header template

https://www.telerik.com/kendo-angular-ui/components/grid/columns/templates/#toc-header-template

and include an element with a click handler attached, inside the template.

Regards,
Dimiter Madjarov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Salim
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Salim
Top achievements
Rank 1
Share this question
or