I want to change checkbox icon of "Ext.selection.CheckboxModel" on button click in ExtJs5. I am using CheckBoxModel in grid.
When checkbox render or display first time, then i am able to change its icon based on condition but i want to change icon on button click or can say dynamically.
Ex. Below is the syntax of using CheckBoxModel in my grid. It's working properly.
{
xtype: 'grid',
selModel: Ext.create('Ext.selection.CheckboxModel',
{
renderer: function (value, metaData, record, rowIndex, colIndex, store, view) {
if (record.data.hold) {
return '';
} else {
return '<div class="x-grid-row-checker"> </div>';
}
}});
}
{
xtype: 'button',
handler: function(){
//When button will be clicked, icon should be change of checkbox.
}
}
Aucun commentaire:
Enregistrer un commentaire