Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by velmurugan on Jun 18, 2009 23:27
open dhtmlx forum
how to get row id and column index when check/uncheck checkbox in a grid?

Hi,
I am using a grid and it has a check boxes. I want to get clicked checkbox row id and column index when i check that check box. i am using mygrid.attachEvent("onCheckbox",doOnCheck); how do i get ?
Thanks.
Answer posted by dhxSupport on Jun 19, 2009 01:46
Instead of using "onCheckbox" better to use "onCheck" event. This event occurs after the state of a checkbox was changed. onCheck event passes the following parameters: 
rId - id or the row;
cInd - index of the cell;
state- state of the checkbox/radiobutton.

mygrid.attachEvent("onCheck",doOnCheck);
function doOnCheck(rId,cInd,state){
   //any custom code here;
}