locate
converts an HTML node or event object to in-table position
function locate( // an HTML node or event object node: HTMLElement|Event): WebixDatatableCellPos
Returns
Section titled “Returns”WebixDatatableCellPos
the cell position
Example
Section titled “Example”var pos = dgrid.locate(event);alert(pos.row); //the row idalert(pos.col); //the column idalert(pos.rind); //the row indexalert(pos.cind); //the column index
Details
Section titled “Details”The method can be used to locate the related cell from some event handler.
The result object contains:
- pos.row - the row id
- pos.col - the column id
- pos.rind - the row index
- pos.cind - the column index