billp
13 Jan 2012, 8:30 AM
Using this plugin: http://www.sencha.com/forum/newreply.php?p=706912 ( Ext.ux.grid.plugin.PagingSelectionPersistence ) works great, but
the only issue I am having is that the headerCheckbox is staying selected when changing pages.
Our store is called each time there is a sort or next page is selected.
Everything else but this works great. I'm sure it's something in what I have setup.
Any suggestions would be great.
This is the code from our grid:
Ext.define('Ext.property.widgets.TPDataGrid', {
extend: 'Ext.grid.Panel',
viewConfig: {
loadMask : false
},
plugins : [ Ext.create('Ext.shared.utils.PagingSelectionPersistence') ],
initComponent: function () {
this.id = 'tPDataGrid';
this.store = Ext.create('Ext.app.stores.TPListStore');
this.height = 350;
this.selModel = Ext.create('Ext.selection.CheckboxModel', {
checkOnly: true,
listeners: {
selectionchange: function () {
var submitBtn = Ext.getCmp('submitButton'),
radioEmpty = Ext.isEmpty(Ext.Object.getKeys(Ext.getCmp('t_type').getValue()));
if (Ext.getCmp('tPDataGrid').getPlugin('pagingSelectionPersistence').getPersistedSelection().length && !radioEmpty) {
submitBtn.setDisabled(false);
} else {
submitBtn.setDisabled(true);
}
}
}
});
this.columns = [
......
Thanks.
the only issue I am having is that the headerCheckbox is staying selected when changing pages.
Our store is called each time there is a sort or next page is selected.
Everything else but this works great. I'm sure it's something in what I have setup.
Any suggestions would be great.
This is the code from our grid:
Ext.define('Ext.property.widgets.TPDataGrid', {
extend: 'Ext.grid.Panel',
viewConfig: {
loadMask : false
},
plugins : [ Ext.create('Ext.shared.utils.PagingSelectionPersistence') ],
initComponent: function () {
this.id = 'tPDataGrid';
this.store = Ext.create('Ext.app.stores.TPListStore');
this.height = 350;
this.selModel = Ext.create('Ext.selection.CheckboxModel', {
checkOnly: true,
listeners: {
selectionchange: function () {
var submitBtn = Ext.getCmp('submitButton'),
radioEmpty = Ext.isEmpty(Ext.Object.getKeys(Ext.getCmp('t_type').getValue()));
if (Ext.getCmp('tPDataGrid').getPlugin('pagingSelectionPersistence').getPersistedSelection().length && !radioEmpty) {
submitBtn.setDisabled(false);
} else {
submitBtn.setDisabled(true);
}
}
}
});
this.columns = [
......
Thanks.