BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@{
var SecondChildGrid = new Syncfusion.EJ2.Grids.Grid()
{
. . .
}
};
var ChildGrid = new Syncfusion.EJ2.Grids.Grid()
{
. . .
},
ChildGrid = SecondChildGrid
};
}
<div class="control-section">
<ejs-grid id="HierarchyPrint" dataSource="ViewBag.EmpDataSource" beforeExcelExport="beforeExport" excelExportComplete="exportComplete" childGrid="ChildGrid" toolbarClick="toolbarClick" toolbar="@(new List<string>() {"ExcelExport" })"
allowExcelExport="true">
<e-grid-columns>
<e-grid-column field="EmployeeID" headerText="Employee ID" textAlign="Right" width="125"></e-grid-column>
<e-grid-column field="FirstName" headerText="Name" width="120"></e-grid-column>
<e-grid-column field="Title" headerText="Title" width="170"></e-grid-column>
<e-grid-column field="City" headerText="City" format='yMd' textAlign="Right" width="135"></e-grid-column>
</e-grid-columns>
</ejs-grid>
</div>
<script>
function toolbarClick(args) {
if (args.item.text === 'Excel Export') {
this.excelExport();
}
}
var childGrid;
function exportComplete(args) {
this.childGrid = childGrid;
}
function beforeExport(args) {
childGrid = this.childGrid;
this.childGrid = null;
}
</script>
|