Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Saida on May 27, 2009 10:52
open dhtmlx forum
get grid Object onRowSelect event.

Hi,

In a jsp page, I have 3 or more grid object. This number will change randomly. I am adding 'onRowSelect' event on each grid. 'onRowSelect' event, internally it will pass 'rowId' and 'index' of the selected cell. Is there any way to get the grid object of a selected row.

Thanks in advance,
Saida
Answer posted by dhxSupport on May 28, 2009 01:33
Inside "onRowSelect" event handler "this" will refer to the necessary dhtmlxGrid object:
grid.attachEvent("onRowSelect",doOnRowSelect);
...
function doOnRowSelect(rowId,cellIndex){
   alert(this.cellById(rowId,cellIndex).getValue()); //get value of the celected cell
}