DataGrid.ProcessingNode

Syntax

ProcessingNode: function(sender, args);

Parameters

sender. Event source.

args. Event information.

Description

The ProcessingNode event occurs on processing table DOM elements.

Comments

In order the ProcessingNode event occurs on processing table DOM elements, the DataGrid.FireProcessingNodeEvent property must be set to True.

Example

To execute the example, the HTML page must contain the DataGrid named grid (see Example of Creating the DataGrid Component). Set identifiers for table cells and change background color of one of the cells by its identifier:

// Set whether the event of processing DOM element must be generated
grid.setFireProcessingNodeEvent(True);
// Create variables for setting DOM element identifiers
var id = "gridId_";
var i = 0;
// Set the ProcessingNode event handler
grid.ProcessingNode.add(function(sender, args) {
    // Set DOM element identifier
    args.div.setAttribute("id", id + i);
    // Increase identifier value
    i = i + 1;
});
/* Render visible rows starting from the row with the 0 index.
DOM elements of cells are addressed during rendering.
As a result of such address the ProcessingNode event is generated,
in which handler the identifier is set for DOM elements of cells.*/
grid.renderVisibleRows(0, True);
// Get a cell by the specified identifier on the page
var cell = document.getElementById("gridId_43");
// Set cell background color
cell.style.backgroundColor = "#86B7FB";

After executing the example table cell background color is changed:

See also:

DataGrid