lock column in tree-columns grid

4 posts, 0 answers
  1. Андрей
    Андрей avatar
    1 posts
    Member since:
    May 2019

    Posted 24 May 2019 Link to this post

    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?

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2499 posts

    Posted 28 May 2019 Link to this post

    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.
  3. carlos
    carlos avatar
    11 posts
    Member since:
    Aug 2020

    Posted 04 Aug 2020 in reply to Viktor Tachev Link to this post

    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>
  4. Nikolay
    Admin
    Nikolay  avatar
    301 posts

    Posted 06 Aug 2020 Link to this post

    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

Back to Top