Disable column resizing for certain columns

6 posts, 0 answers
  1. Scott
    Scott avatar
    2 posts
    Member since:
    May 2014

    Posted 10 Mar 2016 Link to this post

    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?

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 11 Mar 2016 Link to this post

    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!
     
  3. Scott
    Scott avatar
    2 posts
    Member since:
    May 2014

    Posted 11 Mar 2016 in reply to Maria Ilieva Link to this post

    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.

  4. Dimo
    Admin
    Dimo avatar
    8486 posts

    Posted 14 Mar 2016 Link to this post

    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!
  5. Garry
    Garry avatar
    49 posts
    Member since:
    Sep 2012

    Posted 28 Jan in reply to Dimo Link to this post

    It's now 2021. Surely a { resizable: false } property of the column is all that is required?
  6. Tsvetomir
    Admin
    Tsvetomir avatar
    843 posts

    Posted 29 Jan Link to this post

    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/.

Back to Top