3.0 beta 2

Populate grid from a select list

I have a select drop-down list and would like to populate a grid that will refresh depending on which option is selected. I want to use arrays to populate the grid.

var myData= [

var myData1= [

var myData2= [

var myData3= [

<select name="first">
<option value="0">populate grid with myData Array</option>
<option value="1">populate grid with myData1 Array</option>
<option value="2">populate grid with myData2 Array</option>
<option value="3">populate grid with myData3 Array</option>

<!-- Grid -->
<div id="grid">
//create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;

//set number of rows/columns
obj.setRowProperty("count", 6);
obj.setColumnProperty("count", 3);

//provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});

//set headers width/height

//set click action handler
obj.setAction("click", function(src){window.status = src.getItemProperty("text")});

//write grid html to the page
September 8,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.