Hi Friends,
We are using infragistics 16.2 version and we have used the REMOTE paging and filtering option in the GRID. as we have tried to export the whole grid data, application not exporting the whole grid data to excel file instead only the first page data is exporting to the excel file.
Please help us to proceed further. please find the below code sample,
Binding the data into GRID
function BindGrid(gridId, columns, gridData, noSortingColumn, noFilterColumn, isPermission) {
var pageCount = indexGridPageCount();
var gridHeight = indexGridHeight();
$("#" + gridId).igGrid({
primaryKey: "FeatureId",
autoGeneratecolumns: false,
width: "100%",
height: "" + gridHeight + "",
columns: columns,
fixedHeaders: true,
autofitLastColumn: false,
responseDataKey: "Records",
features: [
{
name: "Selection",
mode: "row",
activation: true,
},
name: "Responsive",
enableVerticalRendering: false,
enableCheckBoxes: true
name: "Paging",
type: "remote",
pageSize: "" + pageCount + "",
pageCountLimit: 100,
visiblePageCount: 5,
pageSizeList: [10, 20, 50, 100],
recordCountKey: "TotalRecordsCount"
name: "Filtering",
columnSettings: noFilterColumn,
filterDropDownItemIcons: true,
filterDropDownWidth: 0,
filterExprUrlKey: "filter"
name: "Sorting",
columnSettings: noSortingColumn,
sortUrlKey: 'sort',
sortUrlKeyAscValue: 'asc',
sortUrlKeyDescValue: 'desc'
{ name: 'Tooltips', visibility: 'overflow' },
name: 'Updating',
enableAddRow: false,
enableDeleteRow: isPermission,
editMode: 'none',
rowDeleting: function (e, args) {
featureId = args.rowID;
featureCode = args.element[0].cells[1].innerHTML;
if (featureCode != null) {
var messageDelete = "Are you sure you want to delete " + featureCode + "?";
$('#lblMessage').html(messageDelete);
}
$('#dialogDelete').dialog('open');
return false;
],
enableHoverStyles: true,
dataSource: "@(Url.Action("FeatureGridData"))",
});
Excel Export Button click
$("#btnExcelExport").on("click", function () {
Var url = '@Url.Content("~/Feature/GridView")';
var gridData = BindData(url, 'json', null, false);
var gridLength = $('#gridFeatures').igGrid('rows').length;
if (gridLength == "0") {
$('#dialogExport').dialog('open');
else {
ExcelExport("gridFeatures", "Feature");
Excel export function in JS
function ExcelExport(gridID, excelName, loaderID) {
$.ig.GridExcelExporter.exportGrid($("#" + gridID), {
fileName: excelName,
worksheetName: 'Sheet1',
dataExportMode: "allRows",
gridFeatureOptions: {
paging: "allRows",
sorting: "applied",
summaries: "applied",
filtering: "applied",
columnFixing: "applied",
hiding: "visibleColumnsOnly",
//columnsToSkip: [{ key: "StudyId" }],
error: function (err) {
alert(err.statusText);
Hello,
This is happens because, when you have remote paging on client side, datasource holds only this items that you have listed. This is by design.
And since the igExcelExporter is a client side control, it operates with this items that are represented on client side.
If you want to export the whole items, you have to create an ajax request to the url that your dataSource is. This could be happened from one of the igExcelExporter events. Then you have to get the data and change the grid elements that have to be exported.
You can refer to the attached sample, that I've prepared for you.
If you need further assistance, please feel free to contact us.
As we have verified your sample application, the export operation has export the whole grid data, if we apply the page filtering application does not export the filtered data to excel.
could you please share the sample application to export the filtered data to excel by using remote method.
In the sample that I attached, when I apply some filtering on the grid and cells are filtered and try to export the grid, it exports only the filtered columns.
If I don't have some applied filter on the grid, it is exported with all columns.
Did you try this approach on my sample?
I'm looking forward your reply.