data grid control

Advanced Data Grid Control

[ Data Grid Home ] [ Documentation ] [ Examples & Demos ] [ Buy Now ]

Advanced Data Grid Control

JavaScript and the Data Grid

advanced data grid control

The Data Grid has been designed so that it can dynamically interact with JavaScript objects within the current page.

Having the Data Grid execute embedded JavaScript functions

In addition to a mouse click on a piece of data executing a URL it is possible to set this to execute an embedded JavaScript function.

To do this ensure that "mayscript" is added to your applet tag, i.e.

<applet code="AdvDataGridApplet" archive="AdvDataGrid.jar" width="430" height="333" mayscript>

To set up a cell to execute a JavaScript function the <URL> and <TARGET> elements should be added to that cells data. The <TARGET> element should be set to a value of "javascript" and the <URL> set to the javascript function name.

e.g,

Pie Chart<URL=combo('c1')><TARGET=javascript>

When the cell containing the data "Pie Chart" is clicked the Data Grid will execute the javascript function combo('c1')

For a demonstration of this see Example 4 - click here.

Setting Grid Properties and Data dynamically using JavaScript functions.

The Data Grid has several methods exposed which enable the properties and data of the grid to be updated dynamically from other page objects.

The 3 main methods are,

Change a Grid Property
set_param(parameter, value, re_paint)

Change a Column Property
set_column(column, value, re_paint)

Change a Cell Data Value
set_datavalue(column, row, value, re_paint)

So that the Data Grid may referenced from other page objects it must first be named. This is done by adding the 'name' parameter to the <applet> tag. i.e,

<applet name="DATAGRID" code="AdvDataGridApplet" archive="AdvDataGrid.jar" width="430" height="333" mayscript>

For a full description on each of these methods see Dynamic Methods - click here

For a demonstration of these methods see Example 5 - click here

« back to Getting Started
[ Data Grid Home ] [ Documentation ] [ Examples & Demos ] [ Buy Now ]

Getting Started

Documentation

Examples