Skip to content

locate

converts an HTML node or event object to in-table position

function locate(
// an HTML node or event object
node: HTMLElement|Event
): WebixDatatableCellPos

WebixDatatableCellPos the cell position

var pos = dgrid.locate(event);
alert(pos.row); //the row id
alert(pos.col); //the column id
alert(pos.rind); //the row index
alert(pos.cind); //the column index

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