locate

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

object locate(HTMLElement|Event node);
nodeHTMLElement|Eventan HTML node or event object
objectthe cell position

Example

var pos = dtable.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

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
Back to top
If you have not checked yet, be sure to visit site of our main product Webix ui library and page of datatable product.