TabSheet.HeadersMouseDown

Syntax

HeadersMouseDown: function (sender, args);

Parameters

sender. Event source.

args. Event information. Available arguments: rowIndex - row index for the clicked cell, colIndex - index of clicked cell's column, coordInfo - JSON object that contains information on cell coordinate, event - event of clicking on table head cells with mouse cursor.

Description

The HeadersMouseDown event is fired on clicking table row or column headers.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Process the HeadersMouseDown event:

// Process the HeadersMouseDown event
tabSheet.HeadersMouseDown.add(function (sender, eventArgs) {    
    var e = eventArgs.Event;    
    // Get the cell coordinates by the current cursor position       
    var tabSheetCoord = tabSheet.getCoordUnderMouse(e);    
    // Output the obtained coordinates
    console.log("Cell coordinates: (" + tabSheetCoord.colIndex + ", " + tabSheetCoord.rowIndex + ")")
});

After executing the example on clicking any cell that belongs to row or columns headers, the browser console shows coordinates of this cell:

Cell coordinates: (1, -1)
Cell coordinates: (-1, 2)

See also:

TabSheet