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

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

1 Answer 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ajith
Top achievements
Rank 1
Ajith asked on 06 May 2016, 03:16 PM

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

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 10 May 2016, 10:53 AM
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!
Tags
Grid
Asked by
Ajith
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or