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

Unable to change width of a particular column in Grid

1 Answer 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sourav
Top achievements
Rank 1
Sourav asked on 22 Oct 2011, 12:36 PM
Hi,
    I want to change the width size of a particular column in kendo ui grid. I am able to acheive it but while doing it its actually getting applied for all the columns and at the same time all the other data in the columns not displaying which earlier was before doing the change. Please help me.... 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 24 Oct 2011, 08:28 AM
Hi Sourav,

You can set width to a Kendo Grid column like this:

$(document).ready(function(){
      $("#grid").kendoGrid({
          columns:[
              {
                  field: "FirstName",
                  title: "First Name",
                  width: "100px"
              }]
      });
  });

This will apply a width:100px style to the corresponding column's <col> element. In order to change the width afterwards, you have to modify this style with jQuery or standard DOM operations.

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