extjs - extjs4 CheckboxModel select all -
i want checkboxmodel appear checked when grid rendered:
this code:
sm = ext.create('ext.selection.checkboxmodel', { listeners: { selectionchange: function (sm, selections) { // must refresh view after every selection sm.view.refresh(); } } })
the grid:
{ xtype: 'gridpanel', title: 'gridtitle', selmodel: sm, store: my_store, columns: { items:[ .. ] } }
you use afterrender listeners of grid select rows :
listeners:{ afterrender:function( thisobj, eopts ){ var sm=thisobj.getselectionmodel(); sm.selectall(true); } },
Comments
Post a Comment