javascript - Selection across pages in EXT JS 3.x -
we using ext-js 3.x. select records pages, used method selectrecords(). now, can select records when navigate pages. problem is, on clicking submit button selected records across pages should visible. below line of code grid.getselectionmodel().getselections()
returns selected records in current page. whether there options available selected records?
don't know if can great you, can suggest use new column in store indicate if row selected or not. column boolean. can set value listeners rowselect , rowdeselect. on submit able query store records correct indicator value.
for example:
var mystore = new ext.data.jsonstore({ fields: [{name:"col1", type:"string"}, {name:"indicator", type:"'boolean'"}] }); var mygrid = new ext.grid.gridpanel({ store: store, columns: [...//don't put indicator here sm: new ext.grid.rowselectionmodel({singleselect: false}), .... listeners: { rowselect: (e,index, record){ record.data["indicator"] = true; }, rowdeselect: (e,index, record){ record.data["indicator"] = false; }, .... } });
on submit
var myselection = mystore.query("indicator", true);
i hope give great example , it's not complicated. haven't test code maybe have correct little bit.
good luck!
Comments
Post a Comment