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

Hiding the column menu on hiding a column

1 Answer 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
tahmed
Top achievements
Rank 1
tahmed asked on 14 Mar 2013, 07:13 PM
How do I hide the column menu when the column is hidden from its column menu?

for example if I have 
Col 1 | Col 2 | Col3
and I hide Col 3 from Col3's column menu, I would like to hide its column menu at the same time as well.

My understanding is that the column menus are kendo menu but how do I select the correct menu given the column's field/title from the columnHide event? or is there a better way to do it?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 15 Mar 2013, 08:23 AM
Hello Sudhir,

By design the menu will not close. You can however close it on column show/hide as in the following example:

grid.bind("columnHide", function() {
 $(".k-column-menu:visible").kendoPopup("close");
}).bind("columnShow", function() {
 $(".k-column-menu:visible").kendoPopup("close");
});
 

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
tahmed
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or