Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147524 | Sep 13,2019 07:35 PM UTC | Sep 16,2019 06:53 AM UTC | ASP.NET MVC - EJ 2 | 1 |
![]() |
Tags: Grid |
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.datasource).Load("onLoad").Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("EmployeeID").HeaderText("EmployeeID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("CustomerID").HeaderText("CustomerName").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("OrderDate").HeaderText("Date").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
}).AllowPaging().AllowSelection(true).SelectionSettings(select=>select.Type(Syncfusion.EJ2.Grids.SelectionType.Multiple)).RowSelected("rowSelected").Render()
<script>
function onLoad(args) {
this.columns[3].format = { type: "date", format: "MM/dd/yyyy" };
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.