:: Forum >>

Using onCellChanged or any derivitives of it


I'm trying to build a grid that returns rows from a DB and onchange can send an Ajax request to update the data in the DB.

I'm trying to use onCellChanged or onCellDataChanged or onCellValueChanged to send an alert when one of these events occur. However, I can get NONE of them to work. Here is the code I am using:

function initGrid ()
var resourceGrid = new AW.Grid.Extended;
resourceGrid.setSize(800, 250);
resourceGrid.setCellData(function(i, j){return j + "-" + i});


resourceGrid.onCellClicked = function(event, column, row){ window.status = "Cell " + column + "." + row + " clicked"};

    resourceGrid.onCellChanged = function(value){ alert(value) };

    document.getElementById("resourceGrid").innerHTML = resourceGrid;

setTimeout("initGrid()", 500);

Using the above example, even the onCellClicked parameter doesn't do anything - the status bar stays as is.

I'm sure what I'm doing wrong must be so small or simple. Can someone please point me in the right direction? I'm banging my head against a brick wall and the documentation does not seem to be very clear on any of this.

Also, is there a way to bring data into the grid without using a javascript array? So when the user scrolls for example, new records are loaded via ajax? Again, either I can't find the decent examples or they're fairly basic.

Thanks so much!

Wednesday, September 20, 2006

This topic is archived.

Back to support forum

Forum search