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

Kendo UI grid optimal column width for particular column

1 Answer 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
detego
Top achievements
Rank 1
detego asked on 18 Sep 2012, 08:38 AM

Dear support team,

I use the Kendo UI grid inside a Bootstrap Responsive Layout.So if displayed on smartphones, I would need the following behavior:

Among all columns there should be a particular one, that keeps its optimal width whereas the others should be shrinked down to zero.How can I get this?

As far as I have seen, optimal column widths are available if Grid.Scrollable is set to false.On the other hand, if Scrollable == true and I do not set the width of a certain column, it will fill the gap that is left over from the other columns' common width. Is there a public(?) Kendo function that calculates the optimal column width for a given set of data,that I can call in the dataBound eventhandler?

Best regards,

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 Sep 2012, 02:22 PM
Hello Matthias,

I am afraid there is no built-in function, which calculates the column widths of the Grid. You will have to calculate and/or set them manually. Please apply the desired width style to the <col> elements.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
detego
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or