Hello Vasya can you please help me i want to only 3 column grouped by once if try more then 3 column then unboud it...
$("#grdReport").igGrid({ dataSource: gridData, autoGenerateColumns: false, width: '100%', columns: [
{ key: "IncidentId", hidden: true }, { key: "Policy", dataType: "string", headerText: "Policy" }, { key: "Division", headerText: "Division", dataType: "string", width: "25%" }, { key: "Incident", headerText: "Incident",dataType: "string", width: "10%" }, { key: "EmployeeName", headerText: "Employee", dataType: "string", width: "20%" }, { key: "IncidentDate", headerText: "Date", width: "10%", dataType: "date", format: "MM/dd/yyyy" }, { key: "FromDate", hidden: true }, { key: "ToDate", hidden: true }, { headerText: "", key: "Link", dataType: "string", width: "10%", unbound: true, template: "<button class='btn btn-hre viewIncident' data-id='${IncidentId}'>View</button>"
}
], features: [ { name: 'Sorting', type: "remote", mode: "single", sortUrlKey: "sort"
}, { name: 'Filtering', mode: "advanced", type: "local", filterExprUrlKey: "filter", filterDialogContainment: "window", filterDialogFilterDropDownDefaultWidth: 100 }, { name: 'GroupBy', type: "local", initialExpand: false, defaultSortingDirection: "asc", persist: false, columnSettings: [{ columnKey: "Policy", isGroupBy: true } ],
groupedColumnsChanged: function (evt, ui) { if (ui.groupedColumns.length > 3) { alert("Max. 3 column allowed to group.");
//I WANT TO SOME CODE ON HERE TO REVERT 4TH COLUMN OR REPLACE 3RD COLUMN
return false; } } }, { name: "Paging", type: "local", pageSize: 10, recordCountKey: "TotalCount", pageSizeUrlKey: "pageSize", pageIndexUrlKey: "pageNumber" }, { name: 'Selection', multipleSelection: true }, { name: 'RowSelectors', enableRowNumbering: false }, { name: 'Hiding' }, { name: 'Summaries' } ] });
Thanks in advance..
PANKAJ BAHUKHANDI
Hello Pankaj,
I created a small sample with Group By and Paging features enabled (along with all other features from your configuration). On my side everything works as expected and grouping was correctly applied across all pages.
Attached you will find my sample. Please test it on your side and let me know what is the result. If the issue can still be replicated please provide me with steps to reproduce.
If this this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me for further investigation.
Looking forward to hearing from you.
0550.igGridGroupOnly3Columns (2).zip
I want to paging remote & also use grouping either remote or local...
Thanks,
Pankaj Bahukhandi
Remote Paging does not work as expected with remote GroupBy. We have this listed in our Known Issues topic available here. Please have a look at this document and if your scenario is not matching any of the listed please feel free to get back to me with more details.
Hello Vasya,
can you solved my one more issue...
When I am using Paging the group by only used on single page.. I mean Group By Not worked on Paging type remote....
Thanku Vasya,
Your suggestion helpful for me...
below is my code...
groupedColumnsChanging: function (evt, ui) { debugger; var groupedColumnsCount = ui.groupedColumns.length; if (ui.triggeredBy == 'modalDialog') { var newSize = ui.newGroupedColumns.columns.length; if (newSize > 4) { alert("Please Check, You can group on maximum 4 columns."); return false; } } else { if (groupedColumnsCount > 3 && (ui.triggeredBy == 'dragAndDrop')) { alert("Please Check, You can group on maximum 4 columns."); return false; } } },