This is a migrated thread and some comments may be shown as answers.
Grid Columns - Header with different size
2 Answers 58 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rodrigo Longo
Top achievements
Rank 1
Rodrigo Longo asked on 03 Nov 2010, 07:21 PM
Hi, the columns header of my grid have a different width than the columns in a row. This is my code, I also attached an image. Thanks.

<%= Html.Telerik().Grid((List<Revenue.Model.Producto>)ViewData["Productos"])
                .Name("gridProductos")
                .Columns(columns =>
                             {
                                 columns.Bound(c => c.Codigo).Width(160);
                                 columns.Bound(c => c.Descripcion).Width(270);
                                 columns.Bound(c => c.FechaAlta).Width(150);
                                 columns.Bound(c => c.FechaBaja).Width(150);
                             })
                 .DataBinding(dataBinding => dataBinding.Ajax().Select("ObtenerProductos", "Producto"))
                 //.ClientEvents(events => events.OnRowSelect("OnRowSelect"))
                 .Scrollable()
                 .Pageable()
                 .Sortable()
                 .Filterable()                    
                 .Selectable()
%>

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 04 Nov 2010, 08:02 AM
Hello Rodrigo Longo,

 You have not set the width of the grid. By default the grid occupies all available space (display:block). You should either set the width of the grid or leave one of the columns without Width() so it spreads out to take the available space. All grids in the online demos are configured that way.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rodrigo Longo
Top achievements
Rank 1
answered on 04 Nov 2010, 03:57 PM
Atanas, thank you very much!!

Rodrigo
Tags
General Discussions
Asked by
Rodrigo Longo
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Rodrigo Longo
Top achievements
Rank 1
Share this question
or