PDA

View Full Version : How to set value for checkbox to 'false' in checkboxcombo



samantaditya
9 Jun 2011, 7:09 AM
Hi,

I have a CheckboxCombo in which I am populating values for check boxes from Store.
http://www.sencha.com/forum/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJUAAAB4CAIAAAB0GidEAAAHP0lEQVR4nO2dWW8TSRDH/UF48QeJ+Ax8ozwvsIAEEuwuicI+whtBkVbieCfhEskqmcSJPUwYJz42m8PkML0Po+2d7aOmZrrt6TL1V8lKOn3Wb6pje7qnGw/fnLDRtcbDNyeCFYYG/WQj2rxzd+HFi1fLy6+Wl1/m7Xn+9fnLW7d/24g2mV9AGvST+w+ebGxEmMwbG9H9B0+YX0DK+OHzM7+wJPldXl0VmmB+oUnyOzkZFZpgfqFJ8uv1jvJ2fW5OSen1jgTzC02SXxwfSrs+N5dZPjGODwXzC02S3+bWl8wkvMxk+ubWF6Hzu3ZjHmO1jW/WJfl9/LT38dOexKb8nJkw8ut0djKL490kaX/9Gh8c7Pd63eGwd3Q0PD4+wvBrNBqVx1CtbFbKpd0QJPmtrkUS2OpalJmSIgB+Nninp8dGfo2cxFT4KdlmjN/b1a23q1vX5+ayH6TlU4SNnxFec6l5eno8Gp3p/HSvTZqfTmsm+cEmjPxs8JpLzdHo7Pz8m8LP6DLpTRmRMr0wUacC1A+kUJQHfhm85lJTgddcap6ff7u4OEfyK3SuzeMyBYDB/Kz8ssjLgOnwrq4u8fGn/FqKXyE85WfmJ4QQ127MZ9OmxKbAG4/HLvwUGYsrsQtXPpP8dlrt/Oc8m+202gZ+tmkzg/f9+3df8Wcrjok//f/ozPDr9U9u3nr0eOFpof1081G831f55T8q6PCyPEqrhe8/Pf7/g3nPAL/x+OLuvcWVldd5W15+qaSsrLy+e29x0E9UfhJe9m5TgSdM/ETR5788Esf3nzPPz+n+7bUb8zA8YeHH8iL5/mU0Os9uMnS7g253EMcHUbQfRfuf1/fevd9ZXYvW3m0L/v4zNOn80u4g7Q7izmGO37aVH6teGfilwzQddjoH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T2zlpkzLjPPyXMVmGrVrHJdl9l5KvwKL+eSC+FaykYwrmbrAi0DzuAyT78AyclzFeQD5KALg4Eb0R2ZjSx8AFwLroJ0VaCFaVkoxGWeHp6T5yogPcY3AlcEgpsbL4zDBvCQLTMQntxCTuY5ea4C0y/DVdaSG9FNU/KEwxzBU85jue0rR4FvmYHwCmee8+cq4KOJkcPuYDyu4MEtszx4Be4xPYvnKvgGD5lb84EnOGMLz8lzFeQSYKKDI6ILEFAoOyM4oDuBdJObDTylPzpnbOE9hucq4M+VOcsW3qJ+t6lMR99Et+YPWAQvYBG8gEXwAhbBC1gEL2ARvIBlcnf3P9/1TpIbei391QTeSXJD5oOZZx5Z6UaZF7BR5gVslHkBG2VewEaZF7CZ3JqfZx7yel7pg1xUM4HHKyP3Kth7Wam4THe3rQUGL5t5mL0KyvBxzTTcFUkGrdnDntHp4iDzcvcq2I/EBp59a95mqm3mYfYqYAIhJ6KcK4WSFQNPOQHIaar0RNeC0lW4x7nC45WRexUw8IQDhMPk+NrDk7vIhS14omtBdtVsup4JvGzmYfYqOIFXqBEh1nD2FIUHewUUegGPV0buVcDEXTn/wOe4sjoQdzmgOq7hwsu/NX828zB7FZDRLBoRjOGnTQP3goTHKyP3KuQGyAd4jzHzMHsVlOFQTpLZ6avQtAnAA+ZG2Q24UOkJxlW4x7nC45WRexXcnm5kVvDou01PzCrzyMo1q8wjK9dM7u5eutNkqZnAo8zzxCjzAjYDeP8B2KAd3+cGhqgAAAAASUVORK5CYII=
As shown in above image my checkboxcombo, i have a 'Check All' checkbox which when clicked selects all checkboxes and same vice versa, now my problem is when i click checkall box all checkboxes gets selected and if i deselect some checkboxes apart from 'Check All' box, the Check all box should also gets deselected ie when all are selected only then value of check all should be true.
code :
Ext.ux.form.CheckboxCombo >>>

'onListClick': function(e, t, checked) {
var target = e.getTarget('div.x-form-item');
target = Ext.get(target);
var cb = target.child('input');
cb = Ext.getCmp(cb.id);
if(cb.getRawValue() == 'Y0' || cb.getRawValue() == 'N0'){
if(cb.getValue()){
this.selectAll();
}
else{
this.deselectAll();
}
}else{
if(!cb.getValue()){
// during this condition cb.getRawValue() == 'Y0' || cb.getRawValue() == 'N0' should get //to value 'false'
alert(cb.getRawValue())

}
}