Disable resize for specific column?

2 posts, 0 answers
  1. Andy
    Andy avatar
    8 posts
    Member since:
    Aug 2006

    Posted 22 Jan 2013 Link to this post

    Is there a way to disable column resizing for a particular column only (the last column to be precise)?

    Some more info on my problem, I have enabled fixed table layout on the Grid, so that an Ellipsis will show for fields that are very long.

    /*  allow ellipsis to show on overflow text in grid */
    .k-grid table

    ... but now when the user resizes the last column, there are rendering issues on the Grid - it overruns the width of the grid (see attachment).

    Here is my grid def -

                    .Columns(columns =>
                        columns.Bound(p => p.RoleName).Width(200);
                        columns.Bound(p => p.Description);
                    .Events(events => events.Change("Grid_OnRowSelect"))
                    .HtmlAttributes(new { @style = "width:500px" })
                    .Selectable(s => s.Mode(GridSelectionMode.Single))
                    .Resizable(resize => resize.Columns(true))
                    .DataSource(dataSource => dataSource
                            .Read(read => read.Action("RoleSearch", "Role").Data("Grid_OnData"))
                            .Events(e => e.RequestEnd("Grid_OnRequestEnd"))


  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2123 posts

    Posted 24 Jan 2013 Link to this post

    Hi Andy,

    This is a quote from my answer on the same topic in your Ticket thread:

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

    Kind regards,
    Dimiter Madjarov
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top