Completed
Last Updated: 01 Sep 2022 10:16 by ADMIN
Release 2022.R3
Robert Madrian
Created on: 11 Nov 2016 09:20
Category: Grid
Type: Feature Request
13
Disable columnMenu the same way like disabling sorting or filtering
I want to disable/hide the columnMenu the same way like disabling sorting or filtering...
it is not supported the same way as disabling sorting or filtering but only with some Javascript which is not a good solution and not consistent
4 comments
ADMIN
Patrick | Technical Support Engineer, Senior
Posted on: 23 Feb 2021 14:48

Hi,

Pertaining to the original issue regarding disabling the columnMenu the same way like disabling sorting or filtering, please take a look at Alex's answer. 

 

To those looking for resources regarding data-menu=""false" not functioning as expected from Kendo UI Grid initialized by a table, I wanted to share the following Bug Report and workaround for the issue:

Using the columnMenuInit event, configure the columnMenu based on the data-menu string property:

 

          function onColumnMenuInit(e){

            //Avaliable Grid columns
            var columns = e.sender.columns;

            //get menuItem inputs
            var inputs =  $(e.container).find("input");

            for(var x = 0; x < columns.length; x++){

              //if the column's menu property is set to false
              if(columns[x].menu == "false"){

                //hide the parent span of the input
                $(inputs[x]).parent("span").hide();
              }
            }
          }

 

Please take a look at this updated Progress Kendo UI Dojo for a live example of the implementation above.

Regards,
Patrick
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/.

fereshteh
Posted on: 17 Feb 2021 11:14

hi there
i have a gird which is created from table

i pass data-menu="false" attribute to th tag for setting column.menu but it is not working. would you please help me?
the demo page is here

ADMIN
Alex Hajigeorgieva
Posted on: 15 Oct 2019 07:42

Hi,

Thank you for your interest in this feature request.

Currently, we can only remove a column from the items of the column menu by setting column.menu to false:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.menu

The alternative as Robert mentioned is to use JavaScript for the moment until this feature request gains popularity and can be included in the public API:

https://www.telerik.com/forums/turn-off-column-menu-on-certain-columns#jN6DSOh-lEOertnBWkEJHw

Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Miguel
Posted on: 08 Oct 2019 06:26

I also think that this is easy to achieve and very powerful for grid, sometimes it's needed to disable column menu feature on some columns (for example the first one) that are used to other purpouses.

Thank you in advance.