Below is my code to add Add and Remove labels dynamically based on user selection setting the value works but i am unable to see Add and Remove labels with checkboxes. Can anyone let me know the solution
function dynamicBinding() { var var= Ext.getCmp('students').query('[isCheckbox]'); var grid = Ext.getCmp('grdStudents'); grid.on('selectionchange', function () { var Count = grid.getSelectionModel().getCount(); var totalCount = grid.getStore().getCount(); if (Count === totalCount) { var.setText = 'Remove'; var.setValue = true; } else { var.setText = 'Add'; var.setValue = false; } }); }