GridView.PictureMouseDown

Syntax

PictureMouseDown: function(sender, args, timeout);

Parameters

sender. Event source.

args. Event information. Available arguments:  rowIndex - row index of the cell that contains clicked icon, colIndex - index of the table column that contains this cell, event - icon click event.

timeout. Time delay (milliseconds) after which the event occurs.

Description

The PictureMouseDown event occurs on clicking an image within a table cell.

Example

To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and with the loaded table in the express report workspace. Before executing this example the express report table looks as it is shown in the page with description of the GridView class.

Process the event of clicking an icon with the mouse PictureMouseDown, and get coordinates of the cell that stores this icon:

// Get express report table
var gridView = expressBox.getDataView().getGridView();
// Process the PictureMouseDown event
gridView.PictureMouseDown.add(function (sender, args) {
    console.log("Coordinates of the cells with clicked icon: (" +
        args.rowIndex + ", " + args.colIndex + ")");
});

After executing the example on clicking the icon in the B0 table cell, the browser console displays coordinates of the cell that contains this icon:

Coordinates of the icon cell: (0, 1)

See also:

GridView