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

Column Width of Kendo Grid

3 Answers 370 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Navin
Top achievements
Rank 1
Navin asked on 10 Aug 2012, 12:41 PM
How to set column width depending on the width of it's cell maximum width or set it auto size?   

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Aug 2012, 02:04 PM
Hi Navin,

By default the Kendo Grid has scrolling turned on. This triggers (and requires) a fixed table layout, i.e. all columns with no explicit widths become equally wide. If you disable scrolling, the table layout will be reverted to "auto", i.e. the browser will size columns according to their content.

I am afraid that setting column width depending on the widest cell content is not supported currently.

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!
0
Navin
Top achievements
Rank 1
answered on 16 Aug 2012, 06:19 AM
Hello Dimo, I am attaching snapshot of my grid after setting 
.k-grid table
{
    table-layout: auto;    
}
It is not getting properly align... How to make grid header, content and footer column take same size? 



0
Dimo
Telerik team
answered on 16 Aug 2012, 07:32 AM
Hi Navin,

As I said, scrolling *requires* fixed table layout. Please disable scrolling in order to be able to use auto layout.

Regards,
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
Navin
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Navin
Top achievements
Rank 1
Share this question
or