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
March 18,
var button = new Active.HTML.BUTTON;
button.setContent("html", "Button1");
button.setEvent("onclick", function(){alert(1)});
document.write(button);
Alex (ActiveWidgets)
March 20,
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
March 25,
var obj = new Active.Controls.Grid;
...
button.setEvent("onclick", function(){obj.action("myEdit")});
Alex (ActiveWidgets)
March 25,
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
May 27,