data grid control

Advanced Data Grid Control

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

Advanced Data Grid Control

Dynamic Methods

advanced data grid control

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

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>

The 5 methods are,

 

Reload Grid Data

Change a Grid Property

Change a Column Property

Change a Cell Data Value

Change an entire Row of Cells

 

Reload Grid Data
reload_data("URL")

This method enables the grid to fully reload the data from the specified file/URL

e.g. to add a button to your web page which will turn the cell outlining off,

<input type="button" value="Reload Data" onclick="document.applets['DATAGRID'].reload_data('griddata.txt');">

^back to top

 

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

This method enables any of the Grid Parameters to be modified dynamically during runtime.

parameter - this is the property name as defined in the Parameters section.

value - the value which this property should be set.

re-paint - specifies whether the data grid should be redrawn once the parameter is set. Value can be either "true" or "false"

e.g. to add a button to your web page which will turn the cell outlining off,

<input type="button" value="Cell Grid Off" onclick="document.applets['DATAGRID'].set_param('cellgrid', 'false', true);">

^back to top

 

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

This method enables a column property to be modified. The entire column property string must be given as specified in the Parameters section.

column - this is the column number.

value - the column property string as specified in the Parameters section.

re-paint - specifies whether the data grid should be redrawn once the column is set. Value can be either "true" or "false"

^back to top

 

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

This method enables an individual piece of data to be changed.

column - this is the column number of the cell.

row - this is the row number of the cell.

value - the cell value.

re-paint - specifies whether the data grid should be redrawn once the column is set. Value can be either "true" or "false"

Please Note: Cell and Row numbering start a 0. i.e first row is 0, second row is 1 etc.

e.g. to add a button to your web page which will change the value of cell 0,0,

<input type="button" value="Change cell 0,0" onclick="document.applets['DATAGRID'].set_datavalue(0,0,'Pie Graph and Chart', true);">

^back to top

Change an entire Row of Cells
set_datarow(int row, String value, boolean re_paint)

This method enables an entire row of data to be changed.

row - this is the row number of the cell.

value - the cell value.

re-paint - specifies whether the data grid should be redrawn once the column is set. Value can be either "true" or "false"

Please Note: Row numbering start a 0. i.e first row is 0, second row is 1 etc.

^back to top

 

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