Apr 09, 2018, 4:57 PM
[CLOSED] Header Checkbox is not working properly for Infinite Scroll Grid
Hi Team,
Recently we have upgraded to Ext.Net 4.5 from Ext.Net 2.5, In 2.5 version we were using below override script to show header Checkbox for Infinite Scroll grid. But when we upgraded to new version, this override script is not working and also we are facing issues with select all option.
Thank you
Recently we have upgraded to Ext.Net 4.5 from Ext.Net 2.5, In 2.5 version we were using below override script to show header Checkbox for Infinite Scroll grid. But when we upgraded to new version, this override script is not working and also we are facing issues with select all option.
Ext.selection.CheckboxModel.override({
addCheckbox: function (view, initial) {
var me = this,
checkbox = me.injectCheckbox,
headerCt = view.headerCt;
if (checkbox !== false) {
if (checkbox == 'first') {
checkbox = 0;
} else if (checkbox == 'last') {
checkbox = headerCt.getColumnCount();
}
Ext.suspendLayouts();
headerCt.add(checkbox, me.getHeaderConfig());
Ext.resumeLayouts();
}
if (initial !== true) {
view.refresh();
}
},
onHeaderClick: function (headerCt, header, e) {
if (header.isCheckerHd) {
e.stopEvent();
var me = this,
isChecked = header.el.hasCls(Ext.baseCSSPrefix + 'grid-hd-checker-on');
// Prevent focus changes on the view, since we're selecting/deselecting all records
me.preventFocus = true;
if (isChecked) {
me.deselectAll();
me.toggleUiHeader(false); // added
App.hdnIsSelectAllRows.setValue(0);
} else {
me.selectRange(0, me.getStore().getTotalCount() - 1)
me.toggleUiHeader(true); // added
App.hdnIsSelectAllRows.setValue(1);
}
delete me.preventFocus;
}
}
});
Please help me out.Thank you
Last edited by fabricio.murta; Jul 28, 2018 at 3:40 AM.
Reason: no feedback from the user in 7+ days