This is a migrated thread and some comments may be shown as answers.
Problem with columns width in IE7
1 Answer 23 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.
Konrad
Top achievements
Rank 1
Konrad asked on 24 Mar 2011, 03:22 PM

I have a problem with grid columns. I attached file. 

Code below. 

Html.Telerik().Grid<InvoicePackage>()
                               .DataKeys(k => k.Add(o => o.Id))
                               .Localizable("pl-PL")
                               .Name("InvoicePackageGrid")
                               .DataBinding(dataBinding => dataBinding.Ajax().Select("_GetPackages", "Home"))
                               .ClientEvents(events => events.OnRowSelected("onInvoicePackageRowSelected").OnDataBound("onInvoicePackageDataBound"))
                               .Columns(c =>
                               {
                                   c.Bound(o => o.Id).Title("ID").Width(40);
                                   c.Bound(o => o.InvoiceStatus).Title("Status").Filterable(false).Width(100);
                                   c.Bound(o => o.InvoiceDate).Title("Data faktur").Format("{0:yyyy-MM-dd}").Width(100);
                                   c.Bound(o => o.InvoiceDueDate).Title("Termin płatności").Format("{0:yyyy-MM-dd}").Width(100);
                                   c.Bound(o => o.AcceptedAt).Title("Data akcpetacji").Format("{0:yyyy-MM-dd H:mm:ss}").Width(100);
                                   c.Bound(o => o.CreatedAt).Title("Data utworzenia").Format("{0:yyyy-MM-dd H:mm:ss}").Width(100);
                                   c.Bound(o => o.BookedAt).Title("Data zaksięgowania").Format("{0:yyyy-MM-dd H:mm:ss}").Width(100);
                                   c.Bound(o => o.LastChangedAt).Title("Data ost. zmiany").Format("{0:yyyy-MM-dd H:mm:ss}").Width(100);
                                   c.Bound(o => o.LastChangedBy).Title("Ost. użytkownik").Width(100);
                               })
                               .Sortable(sorting => sorting.OrderBy(sortOrder => sortOrder.Add(o => o.InvoiceDate).Descending()))
                               .EnableCustomBinding(true)
                               .Pageable(paging => paging.PageSize(20))
                               .Scrollable()
                               .Filterable() 
                               .Selectable()
                               .Render()

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 30 Mar 2011, 03:36 PM
Hi Konrad,

Use Width("auto") for the last column of your table and it should be fine, e.g:

...
...
   .Columns(c => 
   
   ...
   c.Bound(o => o.LastChangedBy).Title("Ost. użytkownik").Width("auto"); 
   }) 
...

HTH,
Andrew.
Tags
Grid
Asked by
Konrad
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or