This is a migrated thread and some comments may be shown as answers.

Disable column resizing for certain columns

5 Answers 1262 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 10 Mar 2016, 08:34 PM

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

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Mar 2016, 03:41 PM
Hello Scott,

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.

Regards,
Maria Ilieva
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Scott
Top achievements
Rank 1
answered on 11 Mar 2016, 04:33 PM

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.

0
Dimo
Telerik team
answered on 14 Mar 2016, 02:03 PM
Hi Scott,

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:

http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/disable-column-resize-for-specific-columns

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Brandon
Top achievements
Rank 1
commented on 07 May 2021, 11:23 AM

Hi,

The example for disabling resize works well but how would you handle the removal of the resize-handle for that single column?
1
Garry
Top achievements
Rank 2
Veteran
answered on 28 Jan 2021, 07:33 AM
It's now 2021. Surely a { resizable: false } property of the column is all that is required?
serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 24 May 2022, 05:55 PM

agree with that in 2022, especially for the ASP.NET Core Grid, similar issue
-1
Tsvetomir
Telerik team
answered on 29 Jan 2021, 01:17 PM

Hi Garry,

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:

https://feedback.telerik.com/kendo-jquery-ui

 

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

Brandon
Top achievements
Rank 1
commented on 07 May 2021, 11:23 AM

Hi,

The example for disabling resize works well but how would you handle the removal of the resize-handle for that single column?
Tsvetomir
Telerik team
commented on 11 May 2021, 08:43 AM | edited

Hi, Brandon, the resize handle could be hidden by subscribing to the mousemove event of the header row of the grid and hiding it programmatically https://dojo.telerik.com/OhUweRId
Brandon
Top achievements
Rank 1
commented on 11 May 2021, 09:25 AM | edited

Thanks, I'll take a look.
Tsvetomir
Telerik team
commented on 11 May 2021, 09:32 AM

Hi, Brandon, it appears that I have accidentally shared the incorrect Dojo sample. I have updated my previous comment, could you open the new Dojo and ensure that the resize handle is not shown for the OrderDate column?
Brandon
Top achievements
Rank 1
commented on 11 May 2021, 09:40 AM | edited

Looks good Tsvetomir.
serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 24 May 2022, 05:54 PM

please consider the resize=false for the column, especially for the ASP.NET Core Grid is 2022 and we have no such a simple option 
Georgi Denchev
Telerik team
commented on 26 May 2022, 01:05 PM

Hi, Serge,

There is an open Feature Request about this functionality in our Feedback Portal:

https://feedback.telerik.com/kendo-jquery-ui/1358808-grid-support-of-resizable-and-non-resizable-columns 

I encourage you to leave your vote there. The more votes the request gets, the higher it moves in our list of priorities.

Best Regards,

Georgi

Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Scott
Top achievements
Rank 1
Dimo
Telerik team
Garry
Top achievements
Rank 2
Veteran
Tsvetomir
Telerik team
Share this question
or