Categories | Question details Back To List | ||||||||
getCheckedRows(1).split(",") that gets not the ID but the value in the first row How can I put in ar, not the IDs but the values of the first row ( (0) ) var ar = mygrid.getCheckedRows(1).split(",") ; Answer posted by Support on May 07, 2008 10:19 The latest version of grid contains an error in getCheckedRows functionality, which may cause problems. Please try to add code from attached patch to your js - it must correct issue. Attachments (1)
Answer posted on May 08, 2008 01:11 see... i have this grid: ProductID, CHECKBOX, A, B,.................................... whit var ar = mygrid.getCheckedRows(1).split(",") ; I put in ar the list of the rows checked, how can i get in ar the list of pruductID selected? getCheckedRows argument is the checkbox or where to get the value of the checked raw?? Answer posted on May 08, 2008 02:59 I' did what I wanted with this code: dhtmlXGridObject.prototype.getCheckedRows=function(col_ind){ var d=new Array(); this.forEachRow(function(id){ if (this.cells(id,col_ind).getValue()!=0) { d.push( this.cells(id,0).getValue() ); // <--- 0 is the value i want in place of col_ind } }) return d.join(","); } this way I get column 0 |