Lock Column Issue

10 posts, 0 answers
  1. Keith Pepling
    Keith Pepling avatar
    8 posts
    Member since:
    Nov 2005

    Posted 30 Jul 2014 Link to this post

    Is there a way to load a grid without any locked columns initially and then lock a column?  If I load a grid with no locked columns then I don't even get the option in the column menu to lock.  I also noticed that if I load a grid with one column locked that I can not unlock that column either without first locking another column.  Is this behavior intended and if so is this going to change in the future?
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 31 Jul 2014 Link to this post

    Hello Keith,

    In order to have the locking feature enabled for the grid, you will need to have at least one column locked when initialized.  This is needed so the correct scrollers and heights are set in the grid and it is prepared in order for the locked feature two work. Same is valid for having at least one column locked all the time, when this feature is enabled.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Simon
    Simon avatar
    166 posts
    Member since:
    Sep 2010

    Posted 25 Feb 2015 Link to this post

    Hello Kiril,

    It may sound a little bit basic but can't those scrollers be set and calculated on an hidden div?  

    My users are also requesting for this feature for a while and they don't understand why there's such a limitation.  I'm really struggling to provide them a good explanation (they would understand) as this feature is available with most grid widgets they've used in the past.

    The best I could do so far is to create a fake frozen column with a width of 0.  The problem with this solution is that even if you manage to keep that column hidden in the UI, the column still exists... For instance, it will be listed with every other columns and we have to manage the code all over the place to ignore that column (ex: sort / filter / etc.).

    Do you have any plan about improving the frozen column behavior?

    Best regards,

    Simon
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 27 Feb 2015 Link to this post

    Hello Simon,

    I am afraid that there is no immediate plan for this change, however you can submit this as a feature request on UserVoice, so it will be considered for a future release.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Bridge24
    Bridge24 avatar
    90 posts
    Member since:
    Jan 2009

    Posted 11 Jun 2015 Link to this post

    Wow, I am really surprised that I MUST lock any of my columns to allow my users to edit locked columns...

    It's exactly like if I I need to "group" 1 column to enable grouping, or if I must have 1  column "sorted" to enable sorting... 

    Why can't we enable "allowlock: true" globally in the grid, to get the "lock-unlock" item in the menu, even if no "locked column" is there initially?

  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 12 Jun 2015 Link to this post

    Hello Dani,

    It is required, just because the Kendo UI Grid with frozen columns feature needs to do the correct resizing and aligning the columns, if you inspect the elements you will see that there are actually two tables rendered for the frozen columns functionality that align and resize each other. With that said - option like "allowblock:true" is currently not supported.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Bridge24
    Bridge24 avatar
    90 posts
    Member since:
    Jan 2009

    Posted 12 Jun 2015 in reply to Kiril Nikolov Link to this post

    Thank you.

    I tried a little hack, locking a column on initial load (to get the item in the menu), then, unlock it immediatly after with grid.unlockColumn("fieldname") but I get the error "There should be at least one non locked column"... 

    But, your documentation is clear, there "must" be one locked column, we can't unlock the last one...

    Do you have any workaround to allow a user to be able to lock a column, but also allowing him to lock "nothing"?

    Thank you

  8. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 16 Jun 2015 Link to this post

    Hello Dani,

    I am afraid that we do not have a workaround that will allow the user to lock nothing, as I said - there should be at least one locked column.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Priyank
    Priyank avatar
    5 posts
    Member since:
    May 2018

    Posted 07 Jan Link to this post

    Hello Guys,

    I have some issue with lock column.The issue is when lock applied on column after that when i reorder unlock column with lock column the unlock column also became lock column.

    I want to disable reordering with lock column and i also fix this prevent reordering with lock column. By using this small example

    But still facing issue when just beside unlock column reorder with lock column then i facing this issue. The unlock column also became lock column.
    Is there Any way to fix this ?

    Thanks. 

  10. Petar
    Admin
    Petar avatar
    505 posts

    Posted 11 Jan Link to this post

    Hi Priyank,

    Can you share which version of Kendo UI for jQuery do you use? The Dojo example that you send me uses the Kendo UI for jQuery version from 2015 which doesn't have the functionality provided by our latest product releases. 

    If you check this Dojo example, you will see that columns have a "lockable" property definition set to "false". With this property, the Grid will prevent the "locked" column to be unlocked and the "unlocked" columns from being locked. With this configuration, the columns inside the Grid will continue to be reorderable, which, if I understand your description correctly, is what you need to implement in your application. 

    You can test the linked Dojo. If it demonstrates what you need in your application, I would recommend upgrading your project to the latest Kendo UI for jQuery version. 

    I hope the above will help you implemented the desired functionality.

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

Back to Top