Locking column to left of grid

6 posts, 0 answers
  1. Jaanus
    Jaanus avatar
    36 posts
    Member since:
    Oct 2014

    Posted 22 Sep 2017 Link to this post

    How can I lock one column as the first column of the grid, so it can not be moved/rearranged or hidden?

    I tried Frozen columns, but I was able to reorder and hide the "locked" columns.

    http://demos.telerik.com/kendo-ui/grid/frozen-columns

     

    Thanks

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 26 Sep 2017 Link to this post

    Hello Jaanus,

    You can prevent the dragging for particular columns with the approach demonstrated in the following dojo example:
    As for the other requirement, you could try to set the column to be visible with the showColumn method of the Grid within the columnHide event:

    Best Regards,
    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jaanus
    Jaanus avatar
    36 posts
    Member since:
    Oct 2014

    Posted 26 Oct 2017 Link to this post

    Hello Konstantin,

    Thanks for your answer, it was helpful, but I have a slight issue.

    My issue is that I want to lock a column as first column in grid.

    While I was able to prevent a certain column from dragging, I am still able to drag other columns infront of my "locked" column, thus making the column not first nor locked.

    Is there a possiblity to get the index of position the column is being dragged, so I could disable all the columns from being dragged to 0 index position?

     

    Or you would suggest something else?

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 30 Oct 2017 Link to this post

    Hi Jaanus,

    The main problem here is that the reordering could not be canceled and the only thing that I could suggest is the following approach, but it will have a glitch:
    As for a better solution, you could create a feature request in our public portal for introducing an option for preventing the reordering: 
     

    Regards,
    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Jaanus
    Jaanus avatar
    36 posts
    Member since:
    Oct 2014

    Posted 06 Dec 2017 Link to this post

    Would it be possible to remove the element from the dropdown list all in all, where user is trying to hide the column?

  6. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 08 Dec 2017 Link to this post

    Hi Jaanus,

    Here is a dojo example with the requested functionality, where we manually remove a column from the column menu within the columnMenuInit event:

    Best Regards,
    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top