PDA

View Full Version : Groupingview get last clicked or run function on click



agony
24 Oct 2014, 6:09 AM
So i have a GridPanel that uses GroupingView to sort data.

Headers for each group are formatted with groupRenderer.
Each group has primary info in the header and essentially " history" under that group.

What i now need is a way to run a function when ether a link/button or an image is clicked in the header - or a way to mark active group and store a temp value that i could access from within the function ( its ajax call with some checks).

But it has no click or active or any similar event available.

I tried adding a href tag in the groupRenderer - however i couldn't access the function from it.

Each of the groups would have 1 unique value i can use as a parameter to run the function/ ajax call for data only specific to that group.

For example:

<a style='width: 200px;' href = '#' onClick = 'downloadFiles("+r.get("vehicleid")+")'>" + _("Vehicle status") + "</a>

With the function being in the very same grouprenderer, defined above - yet i still get "is not defined",

slemmon
28 Oct 2014, 3:46 PM
To make sure we're on the same page, is this a framework class you're working with?