Disable column resizing for certain columns

4 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
    8474 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!
Back to Top