How to return the indexes of a cell double clicked
I want to get the indexes (row & column) of a cell double clicked in my grid. I used the following but it keeps on returning "undefined" for each of the indexes:
// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;
// set number of rows/columns
obj.setRowProperty("count", 20);
obj.setColumnProperty("count", 5);
// 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
obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");
obj.setEvent("ondblclick", function(){this.action("myAction")});
obj.setAction("myAction", function(src){alert(src.getRowProperty('index') + ":" + src.getColumnProperty('index'))});
// write grid html to the page
document.write(obj);
Neil Craig
March 28,