@Html.EJS().Grid("Grid").DataSource((IEnumerable<TechForJusticeLib.Domain.SentencingCase>)ViewBag.dataSource).AllowFiltering().Columns(col =>
{
col.Field("StatuteESAS").HeaderText("Statute").Width("150").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("StatuteDesc").HeaderText("Statute Description").Width("150").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
}).AllowPaging(true).PageSettings(page => page.PageCount(1)).FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); })
|
@Html.EJS().Grid("Grid").DataSource((IEnumerable<Object>)ViewBag.dataSource).AllowFiltering().Columns(col =>
{
col.Field("StatuteESAS").HeaderText("Statute").Width("150").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("StatuteDesc").HeaderText("Statute Description").Width("150").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
}).AllowPaging(true).PageSettings(page => page.PageCount(1)).FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).Render()
|
Now nothing appears at all….
Are there any other files which must be in context for this grid to display?
<div class="control-section">
@Html.EJS().Grid("DefaultFunctionalities").DataSource((IEnumerable<TechForJusticeLib.Domain.SentencingCase>)ViewBag.dataSource).Columns(col =>
{
col.Field("StatuteESAS").HeaderText("StatuteESAS").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.Field("StatuteDesc").HeaderText("StatuteDesce").Width("150").Add();
}).AllowPaging().PageSettings(page => page.PageCount(5)).Render()
</div>
|
Scripts installed local location : Application_name-> scripts-> ej2->ej2.min.js
Styles installed local location: Application_name->content->ej2->material.css
|
|
@*syncfusion script and styles*@
<script src="~/Scripts/ej2/ej2.min.js"></script>
<link rel='nofollow' href="~/Content/ej2/material.css" rel="stylesheet" />
|
|
@Html.EJS().ScriptManager()
|
|
<namespaces>
<add namespace="System.Web.Mvc" />
. . .
<add namespace="WebApplication14" />
<add namespace="Syncfusion.EJ2"/>
</namespaces>
<system.web>
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="Syncfusion.EJ2, Culture=neutral "/>
</assemblies>
</compilation>
</system.web>
|
|
@(Html.EJS().Grid("Grid")
.DataSource((IEnumerable<Object>)ViewBag.dataSource)
.AllowFiltering()
.FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); })
.Columns(col => {
col.Field("OrderID").HeaderText("Statute").Width("150").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("CustomerID").HeaderText("Statute Description").Width("150").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
})
.AllowPaging(true)
.PageSettings(page => page.PageCount(1))
.Render())
|