:: Forum >> Version 2 >>
how can get data of a row
More information on this topic is available in the documentation section:
/grid.doc/.
hi,
I need to get the data from the row which is selected.
can't figure out a way to do this.
Friday, June 26, 2009
Try objname.getSelectedRows()
Anthony
Friday, June 26, 2009
Sorry, I clicked 'post' too soon. getSelectedRows() returns row indexes. You can then use those indexes to index into your data array used to populate your grid.
Anthony
Friday, June 26, 2009
You can do something like this...
What i do is make it so when they select, 1, some, or all items in my grid, it will add it to a hidden text box that i will split into an array later
obj.onSelectedRowsChanged = function(rowIndicesArray){
document.getElementById('hidden_selected_rows_teacher_portal_files').value = "" // Clear Current Value
for (i=0;i<rowIndicesArray.length;i++) {
// alert(obj.getCellValue(0,rowIndicesArray[i]))
var oldvalue = document.getElementById('hidden_selected_rows_teacher_portal_files').value;
document.getElementById('hidden_selected_rows_teacher_portal_files').value = oldvalue + "3$3" + obj.getCellValue(0,rowIndicesArray[i]);
}
}
Friday, June 26, 2009
This topic is archived.
Back to /grid.doc/
Documentation:
Forum search