@(Html.EJ().Grid<OrdersView>("Editing")
.Datasource(ds => ds.URL("/Home/DataSource").Adaptor(AdaptorType.UrlAdaptor))
.AllowSorting()
.AllowTextWrap()
.AllowResizing()
.AllowSearching(true)
.AllowPaging()
.PageSettings(page =>
{
page.PageSize(25);
})
.ToolbarSettings(tool =>
{
tool.ShowToolbar(true).ToolbarItems(items =>
{
items.AddTool(ToolBarItems.PrintGrid);
items.AddTool(ToolBarItems.ExcelExport);
});
})
.IsResponsive()
.MinWidth(400)
.AllowScrolling()
.ScrollSettings(scroll => scroll.Width("auto").Height("100%"))
.Mappers(map => { map.ExportToExcelAction(Url.Action("ExportStockList", "Product")); })
.AllowFiltering(true)
.FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
.Columns(col =>
{
col.Field("OrderID").HeaderText("Id").IsPrimaryKey(true).IsIdentity(true).Visible(false).Add();
col.Field("EmployeeID").HeaderText("Kode Produk").TextAlign(TextAlign.Left).Width(150).Add();
col.Field("CustomerID").HeaderText("Keterangan").TextAlign(TextAlign.Left).Width(200).Add();
col.Field("ShipCity").HeaderText("Lokasi").TextAlign(TextAlign.Left).Width(150).Add();
col.Field("ShipName").HeaderText("Kode Stok").TextAlign(TextAlign.Left).Width(150).Add();
col.Field("ShipAddress").HeaderText("Qty").TextAlign(TextAlign.Left).Width(150).Format("{0:N2}").Add();
col.Field("Tools").Template("{{:Freight}}").AllowSorting(false).Width(200).AllowFiltering(false).HeaderText("").Add();
})
.ClientSideEvents(eve => { eve.ActionBegin("begin"); })
) |