sagi.kiran
24 Jul 2012, 8:17 AM
Hi,
Below is description of my issue :
ISSUE : I am having Ext.selection.CheckboxModel for a checkbox column in a grid. I am suppose to execute SelectAll & DeSelectAll rows once I click on header checkbox ( Which is by default implementation in Extjs 4.0.2a).
I migrated to Extjs 4.0.7 and I found on click of Header Checkbox ( in Grid) is not executing any listener like select, deselect. Hence my existing code is not working properly.
Can you please let me know why any listeners are not executing now on select All ( click on header checkbox in checkbox column of grid). If possible please provide any workaround if required.
Ext.create('Ext.selection.CheckboxModel', {
listeners : {
deselect : function(model, record, index) {
id = record.get('productLineItem').split(' ').join('_X_');
var productLineIdString = Ext.getCmp('selectedProductLineId')
.getValue();
var newString = productLineIdString.replace(id, "");
Ext.getCmp('selectedProductLineId').setValue(
Util.removeSpaces(newString));
},
select : function(model, record, index) {
var id = record.get('productFamilyBlockId');
Ext.getCmp('selectedId').setValue(id);
var modifiedProductLine = record.get('productLineItem').split(
' ').join('_X_');
var productLineId = modifiedProductLine + " "
+ Ext.getCmp('selectedProductLineId').getValue();
Ext.getCmp('selectedProductLineId').setValue(
Util.removeSpaces(productLineId));
}
}
})
NOTE:
1)Above listeners are executing perfectly on single or multiple row level checkbox click.
2) I am facing issue once I started using Extjs 4.0.7 libraries.
Below is description of my issue :
ISSUE : I am having Ext.selection.CheckboxModel for a checkbox column in a grid. I am suppose to execute SelectAll & DeSelectAll rows once I click on header checkbox ( Which is by default implementation in Extjs 4.0.2a).
I migrated to Extjs 4.0.7 and I found on click of Header Checkbox ( in Grid) is not executing any listener like select, deselect. Hence my existing code is not working properly.
Can you please let me know why any listeners are not executing now on select All ( click on header checkbox in checkbox column of grid). If possible please provide any workaround if required.
Ext.create('Ext.selection.CheckboxModel', {
listeners : {
deselect : function(model, record, index) {
id = record.get('productLineItem').split(' ').join('_X_');
var productLineIdString = Ext.getCmp('selectedProductLineId')
.getValue();
var newString = productLineIdString.replace(id, "");
Ext.getCmp('selectedProductLineId').setValue(
Util.removeSpaces(newString));
},
select : function(model, record, index) {
var id = record.get('productFamilyBlockId');
Ext.getCmp('selectedId').setValue(id);
var modifiedProductLine = record.get('productLineItem').split(
' ').join('_X_');
var productLineId = modifiedProductLine + " "
+ Ext.getCmp('selectedProductLineId').getValue();
Ext.getCmp('selectedProductLineId').setValue(
Util.removeSpaces(productLineId));
}
}
})
NOTE:
1)Above listeners are executing perfectly on single or multiple row level checkbox click.
2) I am facing issue once I started using Extjs 4.0.7 libraries.