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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Column Width - TagHelper

Thread ID:





129691 Mar 28,2017 10:32 PM UTC Mar 29,2017 04:54 AM UTC ASP.NET Core 1
Tags: Grid
Andy Watt
Asked On March 28, 2017 10:32 PM UTC


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

Venkatesh Ayothi Raman [Syncfusion]
Replied On 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. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon