Auto adjustment of grid width not working after Introducing Freeze pane column

2 posts, 0 answers
  1. Ajith
    Ajith avatar
    3 posts
    Member since:
    Sep 2012

    Posted 06 May 2016 Link to this post

    Hi 

    When I add lock to my first column, a horizontal scroll get added from the second column. that is expected behaviour.

    Though when I remove some column from the Grid, the total width of Grid does not reduce according to remaining column, instead it remain static as before.

    If someone want to replicate the issue they can use below example and following replication steps.
    http://dojo.telerik.com/arEHa
    1. make first column locked.

    2. start removing column from last.

    3. analyse the width of Grid whether reduced or not.

    4.unlock first column.

    5. repeat step 1-3 and see result.

    can someone suggest a solution with both feature enabled, first column locked and total grid width should reduce with removal of column.

    Thanks

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1274 posts

    Posted 10 May 2016 Link to this post

    Hi Ajith,

    The described behavior is expected. The Grid needs to be scrollable, and all columns need to have explicit pixel widths set, for the column locking to work. When this is the case, if the sum of all columns widths is less than the width of the Grid, a "gap" between the right-most column and the right border of the Grid will appear.

    The columns will be distributed evenly to auto-fill the available space when their widths are not explicitly set, and/or the scrollable option is set to false.

    You can find detailed information about the Grid appearance in different scenarios in the following section of our documentation:

    http://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance#columns

    Further resizing of the Grid is possible via applying custom logic dynamically over the Grid's table elements, for example in the dataBound (or some other) event handler, but the implementation of such custom scenarios that are not supported is up to the developer, and can lead to undesired side effects.

    Let us know if you have other questions about Kendo UI.

    Regards,
    Dimiter Topalov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top