:: Forum >>

Double Click Help please!

Im truely sorry but I just dont understand whats happening, this is what I have:


// create the grid object
var obj = new Active.Controls.Grid;

// replace the built-in row model with the new one (defined in the patch)
obj.setModel("row", new Active.Rows.Page);

obj.setProperty("row/count", {ROW_COUNT});
obj.setProperty("column/count", 4);
obj.setProperty("data/text", function(i, j){return myData[i][j]});
obj.setProperty("column/texts", myColumns);

// set page size
var row = new Active.Templates.Row;
row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");

obj.setProperty("row/pageSize", 10);

// dblclick setup
row.setEvent("ondblclick", function(){this.action("dblClickAction")});
obj.setAction("dblClickAction", function(src){
var i = src.getProperty("item/index");
alert(this.getDataText(i,0) + ' ' + this.getItemProperty("text"));

obj.setTemplate("row", row);



It just keeps showing the same errors.
I need to get the value of the first column.

Thursday, June 16, 2005
It would help to know what errors you are seeing. What was the reason you replaced the row model?
Jim Hunter
Friday, June 17, 2005
It says something about missing { and that obj is not defined. I dont know about the "replace the built-in row model" but it just doesnt work without that line of code.

Thanks in advanced.
Sunday, June 19, 2005
Maybe because this line without "function()" before '{' ??
or remove {}
obj.setProperty("row/count", {ROW_COUNT});
Sunday, June 19, 2005

This topic is archived.

Back to support forum

Forum search