9 Answers, 1 is accepted
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.
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?
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,
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?
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,
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"?
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,
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 ?
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.
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/.