0

I'm building a grid using @(Html.Kendo().Grid(Model.MyModel)) syntax:

@(Html.Kendo().Grid(Model.MyModel)
                    .Name("GridName")
                    .Columns(columns =>
                    {
                         column.Bound(c => c.ID).Title("ID#").Width("150px");
                    })

When Grid is built, each column created has a menu containing "Lock", "Unlock" options.

I created a java script function to remove the "Lock" element from the menu and I believe it is supposed to be called when Grid is initializing?

   function columnMenuInit(e) {
        alert('1');
        var item = e.container.find(".k-i-lock");
        item.prev(".k-separator").remove();
        item.remove();
    }

However, this function is not called. How can I call it using my construct? Or I do not have to even use that function, since there is something that I can use when defining my grid?

How can I remove them?

gene
  • 2,098
  • 7
  • 40
  • 98
  • Did you try using css ? #gridname .k-i-lock { display:none } – Richard Feb 23 '18 at 23:35
  • Thank's, I tried a few ways, but the best one was to set the column definition to Lockable(false). Apparently, I did not know that Lock/Unlock options can be treated differently from other options – gene Feb 26 '18 at 14:28

0 Answers0