How to maintain checkbox selected after navigation through different pages in jsgrid through jquery? -


unable maintain data or (checkbox selection) after page navigation? or can example:i on page 1 of jsgrid , have checked 2 rows using check box available on row , navigate second page , again come first 1 selection lost.

add field on data item track checkbox state. in itemtemplate restore value on each rendering.

{      name: "fieldname",      align: "center",     itemtemplate: function(value, item) {         return $("<input>").attr("type", "checkbox")                 .attr("checked", value || item.checked)                 .on("change", function() {                     item.checked = $(this).is(":checked");                 });     } } 

here working fiddle http://jsfiddle.net/tabalinas/xo1npabw/

as alternative can store checkbox state in separate array in demo "batch delete" on demo page.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -