We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Fix column width

Hi,

In the example below, we can see the "checkbox" column cut out.


The display on the notebook gets worse..

Is it possible to fix the width of a column at any resolution?

How can I ensure that the checkbox is always visible?

Thank you!
Marcelo

Attachment: gridcolumn_b7a549f2.zip

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team November 29, 2019 07:12 AM UTC

Hi Marcelo, 

Greeting from Syncfusion support. 

Query: Is it possible to fix the width of a column at any resolution? 
 
By default, when we apply width for all columns then it automatically adjust based on the grid width(browser size). If you want to apply static width for column then we suggest you to use the below way. 

In the below sample, we have not applied width for Freight column so all other columns are having static width and Freight column will be adjust based on the screen resolution. 

<ejs-grid ref="grid" id="grid" :created="created" :dataSource="data" :allowPaging="true" gridLines="Vertical"> 
  <e-columns> 
    <e-column type="checkbox" width="60"></e-column> 
    <e-column field="OrderID" headerText="Order ID" width="90" textAlign="Right"></e-column> 
     <e-column field="Freight" headerText="Freight" format="C2" textAlign="Right"></e-column> 
    <e-column field="OrderDate" headerText="Order Date" width="130" textAlign="Right" type="date" format="yMd"> 
    </e-column> 
    <e-column field="ShipCountry" headerText="Ship Country" width="150"></e-column> 
  </e-columns> 
</ejs-grid> 



Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon