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

Grid Column Width - TagHelper


How do I set a column width in pixels?  I believe the column tag helper is defaulting to percentages.

I would like to use a mix of pixel and percentage widths.


<e-column field="email" header-text="Email" text-align="Left" width="45"></e-column>

Thanks, Andy

1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team March 29, 2017 04:54 AM UTC

Hi Andy, 
Thanks for contacting Syncfusion support. 
We can give column width in mix of pixel and percentage like as follows, 
Code example
<ej-grid id="FlatGrid" datasource="@ViewBag.child" allow-paging="true>         
        <e-column field="OrderID" is-primary-key="true" header-text="Order ID" text-align="Right" width=@("60px")></e-column> 
        <e-column field="CustomerID" header-text="Customer ID" width=@("80px")></e-column> 
        <e-column field="EmployeeID" header-text="Employee ID" allow-editing="false" text-align="Left" width=@("20%")>        
        <e-column field="Freight" header-text="Freight" edit-type="Numeric" format="{0:C2}" width=@("15%")> 
            <e-numeric-edit-options decimal-places="4"></e-numeric-edit-options> 

Venkatesh Ayothiraman. 

Live Chat Icon For mobile
Up arrow icon