|
Index.cshtml
<div>
<ejs-grid id="Grid" dataSource="ViewBag.DataSource" allowTextWrap="true" width="500" allowPaging="true">
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" textAlign="Right" width="120"></e-grid-column>
<e-grid-column field="CustomerID" customAttributes=@(new { @class="e-removewrap" } ) headerText="CustomerID" width="80"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" format="N2" width="120"></e-grid-column>
<e-grid-column field="OrderDate" headerText="Order Date" type="date" format="yMd" width="120"></e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" width="90"></e-grid-column>
</e-grid-columns>
</ejs-grid>
</div>
<style>
.e-grid .e-headercell.e-removewrap .e-headercelldiv,
.e-grid .e-rowcell.e-removewrap {
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
|
Hi Ajith,
do you have a sample on this using EJ1 ASP.NET MVC
Hi NKhumiseni,
Greetings from Syncfusion.
As per your request, we have prepared sample in EJ1 Grid with ASP.NET MVC
Refer to the documentation link:-
https://help.syncfusion.com/aspnet-core/grid/columns?cs-save-lang=1&cs-lang=css#customize-column
https://help.syncfusion.com/api/js/ejgrid#members:columns-customattributes
You can use either CssClass or CustomAttributes property for particular column in order to remove wrapping for that column. Please get back to us if you need any further assistance.
Regards,
Farveen sulthana T