@{
    ViewData["Title"] = "Home Page";
    List<object> toolbarItems = new List<object>();
    toolbarItems.Add("ExcelExport");
    toolbarItems.Add(new { text = "Server Excel", tooltipText = "Server Side Excel", id = "serverExcel" });
}


<ejs-grid
    id="Grid"
    allowGrouping="true"
    allowPaging="true"
    allowFiltering="false"
    allowExcelExport="true"
    toolbarClick="toolbarClick"
    allowSorting="true"
    height="500"
    toolbar="@toolbarItems"
        dataSource="@ViewBag.DataSource">
    @* <e-data-manager url="/Home/UrlDataSource" adaptor="UrlAdaptor"></e-data-manager> *@
    <e-grid-filtersettings type="Excel"></e-grid-filtersettings>
    <e-grid-groupsettings columns="@(new string[] {"Date"})" showDropArea="false"></e-grid-groupsettings>
    <e-grid-pagesettings pageSizes="@(new string[] { "5", "10", "20", "30", "120", "500", "All"  })" pageSize=120></e-grid-pagesettings>
    <e-grid-columns>
        <e-grid-column field="ID" headerText="Id" isPrimaryKey="true" textAlign="Right" width="100"></e-grid-column>
        <e-grid-column field="Date" headerText="Movement Date" customFormat="@(new { type ="date", format="MM/dd/yyyy" })" type="date" textAlign="Right" width="140"></e-grid-column>
        <e-grid-column field="Type" headerText="Type" type="number" textAlign="Right" width="100"></e-grid-column>
        <e-grid-column field="Quantity" headerText="Quantity" type="number" format="C2" textAlign="Right" width="120"></e-grid-column>
        <e-grid-column field="Location" headerText="Location" type="string" width="150"></e-grid-column>
        <e-grid-column field="Status" headerText="Status" type="string" width="150"></e-grid-column>
    </e-grid-columns>
    <e-grid-aggregates>
        <e-grid-aggregate>
            <e-aggregate-columns>
                <e-aggregate-column field="Quantity" type="Sum" format="C2" groupCaptionTemplate="${Sum}" footerTemplate="${Sum}"></e-aggregate-column>
            </e-aggregate-columns>
        </e-grid-aggregate>
    </e-grid-aggregates>
</ejs-grid>

<script>

</script>