Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prasad on Nov 27, 2007 03:42
open dhtmlx forum
MouseEvent Object

Hi,
I am using setOnHeaderClickHandler() event.
I want the rowId and column index of the clicked header cell.
I am getting column Index but not rowId. I am getting second parameter as MouseEvent Object.
Is it possible to get rowId from MouseEvent Object? How?
If not then other possible way to find rowId?

Thanks in Advance.
Answer posted by Stanislav on Nov 27, 2007 03:47
The next must work

var index = (grid.getFirstParentOfType(_isIE?e.srcElement:e.target,"TR")).rowIndex;

where grid -grid object
           e - event object

getFirstParentOfType method track related TR, and rowIndex property contains index of row