:: Forum >> Version 1 >>

Fire custom Actions

Me again, sorry. I was wondering if there's a way to fire the custom actions on the grid. I'm using the following to do a "double click to edit" type functionality:

row.setEvent("ondblclick", function(){this.action("myEdit")});
obj.setAction("myEdit", function(src){

I was wondering if it's possiable to make a standard html button also access the same?
Kenneth
Thursday, March 18, 2004
var button = new Active.HTML.BUTTON;
button.setContent("html", "Button1");
button.setEvent("onclick", function(){alert(1)});
document.write(button);
Alex (ActiveWidgets)
Saturday, March 20, 2004
Although that makes sense, I don't see how the function(){alert(1)} would fire the grid's .this.action("myEdit") function. Is it not possible to programmatically fire events on the grid?
Kenneth
Thursday, March 25, 2004
var obj = new Active.Controls.Grid;
...
button.setEvent("onclick", function(){obj.action("myEdit")});
Alex (ActiveWidgets)
Thursday, March 25, 2004
i'm sorry i'm a newbie and i just can't find where's my mistake when i try to make a button which would fire the ondblclick event in the grid:

function addHighEnd(src){..}
var obj = new Active.Controls.Grid;
obj.setRowProperty("count", <%=row%>);
obj.setColumnProperty("count", 2);
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});
obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");
obj.setAction("click", printRowData);
var row = new Active.Templates.Row;
row.setEvent("ondblclick", function(){this.action("myAction")});
obj.setTemplate("row", row);
obj.setAction("myAction", addHighEnd);

and far below that code i typed:

var button = new Active.HTML.BUTTON;
button.setContent("html", ">>");
button.setEvent("onclick", function(){obj.action("myAction")});
document.write(button);

but this button returns an error when it's clicked..
Yusuf
Thursday, May 27, 2004



This topic is archived.

Back to support forum

Forum search