jquery - jqGrid setselection true not work -
i have jggrid list of object, want select rows on load page. code
multiselect: true, loadcomplete: function(){ var ids = $("#listdafatturare").jqgrid('getdataids'); for(var = 0; <= ids.length; i++){ $("#list").jqgrid('setselection', i, true); } },
but don't run, in view see selected 1 row. don't understand problem, try debug code , apparently there no problems.
any ideas?
i resolved in mode:
loadcomplete: function(){ var i, count, $grid = $("#list"); var rowarray = $("#list").jqgrid('getdataids'); (i = 0, count = rowarray.length; < count; += 1) { $grid.jqgrid('setselection', rowarray[i], true); } },
Comments
Post a Comment