3.2.0

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
April 29,
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)
April 29,
It would be great, I need it...
Thank you!
cabroncete
April 30,
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
February 14,

This topic is archived.

See also:


Back to support forum