I have a checkcolumn (called ‘Leader’) and when the user clicks th ‘Create Project’ button, I want there to be an alert message displayed if no checkboxes in the checkcolumn are checked (i.e. if the user does not select a checkbox). Right now I have the following code which creates an array (called ‘data’) of all the ‘Leader’ checkcolumn values of each record. However I do not know how to display an alert if all the values (in ‘data’) are false (i.e. no checkbox is checked). Here is my code:
buttons: [{
text: 'Create Project',
id: 'createprojectbutton',
handler: function (){
var form = this.up('form').getForm();
var data = [];
teststore.each(function(rec){
data.push(rec.get('Leader'));
});
}
}]
You mean something like this: