Categories | Question details Back To List | ||
get unchecked rows and store it in another array variable. function activateCampaign(){ var allRowsId = mygrid.getAllRowIds(); var count = mygrid.getRowsNum(); var allRowsArr = [allRowsId]; // var allRowsArr = allRowsId.split(","); alert(allRowsArr); var checkedRows = mygrid.getCheckedRows(0); // alert("checkedRows"+checkedRows ) var chked = [checkedRows]; // var chked = checkedRows.split(","); var temp = 1; for(var i = 0 ; i<allRowsArr.length; i++) { for(var j = 0; j<chked.length; j++ ) // console.log(chked[j] ) if(allRowsArr[i] == checkedRows[j] ){ temp = 0; break; }else temp=1; if(temp !=0) console.log(allRowsArr[i]); } } In my grid i want select rows which are unchecked and want to send to server side. var checkedRows = mygrid.getCheckedRows(0); this functions gives me checked rows. var allRowsId = mygrid.getAllRowIds(); this gives me all rows in grid. i want store unchecked values in new array list thanks Ravindra Booyi Answer posted by Support on Jan 09, 2009 09:00 There is a more simple way var unchecked = []; mygrid.forEachRow(function(id){ if (grid.cells(id,0).getValue()=="0") unchecked.push(id); }); |