3.2.0

Double Click Help please!

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

<script>

// 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);

document.write(obj);

</script>

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

Danielx
June 16,
It would help to know what errors you are seeing. What was the reason you replaced the row model?
Jim Hunter
June 17,
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.
Danielx
June 19,
Maybe because this line without "function()" before '{' ??
or remove {}
obj.setProperty("row/count", {ROW_COUNT});
Carlos
June 19,

This topic is archived.

See also:


Back to support forum