Data Grid - onDataRowClick event

This example demonstrates how to specify a function to be executed when a data grid row is clicked. This event is called onDataRowClick. Once the event is activated, the function that will be executed for this event will receive 2 parameters: row and record id.

    Syntax: myGrid.onDataRowClick = function myFunction(row, recordId);

In this example, a function named onRowClick is assigned to the onDataRowClick event. When a row is clicked, the information about the clicked row will appear at the bottom on the Grid area.

    function onRowClick (row, recordId){
        var info1 = createTR('Selected Row', row);
        var info2 = createTR('Record ID', recordId);
        $('myclicked').innerHTML = '<center><table>' + info1 + info2 + '</table></center>';
    }

Note: The event onDataRowClick can be activated before or after the DataGrid object is constructed (through go command).