I want to export an entire dataset to excel (not just the current page in my grid). Im trying to follow the online help sample
https://www.igniteui.com/infragistics-excel/overview
but It wont compile because this doesnt exist
using Infragistics.Documents.Excel;
so these arent recognised
WorkbookFormat excelFormat;
excelFormat = WorkbookFormat.Excel2007;
can anyone help ?
Hello Mark,
Thank you for contacting Infragistics!
If you want to do the exporting on the server you can look into the following documentation on the excel engine:
https://www.igniteui.com/help/excelengine-using-the-infragistics-excel-engine
You can also still export from the client by using an ajax call to get your data:
function exportGrid() { var gridAllData = []; var url = "@Url.Action("exportData")";
$.ajax({ url: url, method: "GET", dataType: "json", success: function (data) { $.ig.GridExcelExporter.exportGrid($("#grid1"), {}, { exportStarting: function (args) { args._gridData = data.Records; } }); }, error: function (jqXhr, textStatus, errorThrown) { console.log(errorThrown); } }); }
“exportData” in the url is a method in the controller that returns all the data in the grid.