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

lock column in tree-columns grid

3 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Андрей
Top achievements
Rank 1
Андрей asked on 24 May 2019, 07:21 AM

I use grid with params

columnMenu: true,

columns: [{

    "title": "Docs",
    "command": [
    {
         "name": "B24",
         "click": func,
    }
    ],
        "locked": true,
        "lockable": false,
        "hidden": false,
},

{
    "title": "title1",
    "columns": [
    {
        "title": "title2"

....

....

....

]

And with tree header structure I do not see in columnMenu lock-unlock buttons.

How can do that they will be visible?

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 28 May 2019, 07:09 AM
Hi Андрей,

When multi-column headers are enabled for the Grid locking is possible for an entire group only. A nested column cannot be locked on its own. 

On the other hand the column menu is available only for the actual bound columns. Having lock/unlock option there would not make sense as locking a nested column should lock the entire group. Such implementation would lead to confusion and unexpected results by the users. This is why the lock/unlock options are not present with multi-column headers. 


Regards,
Viktor Tachev
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.
0
carlos
Top achievements
Rank 1
Veteran
answered on 04 Aug 2020, 12:00 PM

Hi Viktor,

I am trying to bolt columns and make column locks that have other 'child' columns nested, but doing so does not show the lock icon and the unlock icon in the column menu.
this is the code i am using:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>
 
 
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
</head>
<body>
   
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name", width: 200, locked: true, lockable: true },
    { field: "age", width: 200, locked: true, lockable: true },
    { title: "multi", locked: false, lockable: true,  width: 600, columns:[
      { field: "hometown",  width: 300 },
        { field: "siblings",  width: 300}]
    }       
  ],
  dataSource: [
    { name: "Jane Doe", age: 30, hometown: "Sofia, Bulgaria", siblings: 3 },
    { name: "John Doe", age: 33, hometown: "Boston, MA, USA", siblings: 1 }
  ],
  columnMenu: true
});
var grid = $("#grid").data("kendoGrid");
</script>
</body>
</html>
0
Nikolay
Telerik team
answered on 06 Aug 2020, 10:28 AM

Helo Андрей,

My name is Nikolay and I will get hold of this thread until my colleague Viktor returns to the office.

When the Grid has Multi-column headers - the "Lock/Unlock" menu button options will not be visible. This column menu functionality does not combine with Multi-column headers. It is a limitation to be added to the documentation.

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Tags
Grid
Asked by
Андрей
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
carlos
Top achievements
Rank 1
Veteran
Nikolay
Telerik team
Share this question
or