:: Forum >> Version 1 >>

pass parameters to action functions

Hello I want to know how to pass parameters to the functions attached to de actions of the grid

I've this code:

grid.setAction("MyAction", MyFunction);

I've tryed :
grid.setAction("MyAction", MyFunction(param1, param2));

And I get an javascript error..
I want to pass parameters to MyFunction....how do I do?

Thanks
cabroncete
Thursday, April 29, 2004
Somehow I forgot to add action parameters - I will do it with the next release. Currently there is only one parameter, which is reference to the action source.
Alex (ActiveWidgets)
Thursday, April 29, 2004
It would be great, I need it...
Thank you!
cabroncete
Friday, April 30, 2004
Indidentally, you can do a work around for this I found...

this works:
allStepsGrid.setAction("click", function(src){test(src.getItemProperty("text"))});

see? the function(src) itself is just a shell to another function, and it can have items passed into it. In the above example, use this test function:

function test(thing){
alert(thing)
}
and it will pop up the value selected.
Mitch
Monday, February 14, 2005



This topic is archived.

Back to support forum

Forum search