There is a global option on the grid called resizable that, when true, makes all columns resizable.
I want some of my columns to be fixed, in other words to disable resizing on those columns. I tried intercepting the columnResize event, but that only fires after the column has been dragged to a new size.
How can I disable resizing of particular columns?
5 Answers, 1 is accepted
Disabling the resizing of only one column is not supported by default. I can suggest you the following workaround - you could attach to the columnResize event and each time the column is resized, just return it's width to the previous value. Here you could see a JsBin example of the described approach - Disable Grid Resizing Code
I hope this helps.
That's extremely unfortunate! As I said, the columnResize event is not suitable because it fires *after* the user has tried to resize the column. So the user is led to believe they can resize the column but then their action is inexplicably cancelled.
Is there any plan to add support for this in a future release? I'm not the first to ask for this question. It would be quite nice to have.
While we do not plan to include the discussed feature out-of-the-box (at least for the time being), there is a way to achieve the desired behavior. Here is a new documentation resource about it:
It is correct that for the developer the option might look like "columns.resizable". However, internally the grid uses an external Resizable widget for the resizing of its columns.
At present, we have seen no particular demand in implementing this as a built-in option and we are currently focusing on other more demanded functionalities.
If you would like to log an item so that we add it out of the box, you could do so here:
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/.