function gridSetElementValue( gridname,row,column,thevalue)
{
var objGrid = ColdFusion.Grid.getGridObject(gridname);
objRow = objGrid.store.data.items[row];
objRow.set(column,thevalue);
objGrid.view.refreshRow(row);
}
In order to determine the row number of the currently selected grid row you must define an event listener for the grid as indicated below. Note the following:
- The function must be declared within the section of the page
- You must use ColdFusion’s ajaxOnLoad() function to invoke the event listener definition
initGrid = function()
{
var grid = ColdFusion.Grid.getGridObject("incidentGrid");
grid.addListener("rowclick", function(objGrid, rowNumber, e){
selectedRow = rowNumber;
});
}
Invoke using the following:
<cfset ajaxonload("initgrid")>

2 comments:
I am trying to add a rowclick event to a cfgrid in cf9 that will load a "drill down" grid in a cfdiv using ColdFusion.navigate.
I cannot get the data "key" from the initial cfgrid using the cf8 syntax mygrid.getDataSource() This fails as getDataSource is not a function. Any help on this?
Freddy, any luck with your issue? I'm having the same issue. Trying to pass row info using the rowclick listener, and grid.getDataSource appears to be unsupported in the latest version of Ext.
Post a Comment