vote up 0 vote down
star

I have a sports site with several datagrids that list players. I want to drilldown on a player's name to obtain more info about him with a function like

private function moreInfo(event:ListEvent):void { trace (event.currentTarget.id);

svc.getPlayerByYear(dg1.selectedItem.nameID);

}

where dg1 is the datagrid id and shows up in the trace.

I wish to extend this to other datagrids e.g. dg2 by using the (event.currentTarget.id) in the service call but have so far failed to find the correct method of binding, brackets or whatever is required

Cheers

flag

2 Answers

vote up 0 vote down

Hey,

Sorry to be rude - but I'm have a bit of difficulty understand what you require?

Would you like 2 datagrids with similar formatted information referencing the same function upon the ListEvent fired? If so - you have no need to reference the ID. In order for this function to work with both dg1 and dg2 - you would change:

svc.getPlayerByYear(dg1.selectedItem.nameID);

to

svc.getPlaterByYear(event.currentTarget.selectedItem.nameID);

Is this what you were looking for? If not, can you put an exmaple online and allow view source?

link|flag
Thanks. I think the problem was that i had used event.currentTarget.id as when traced that is what gave me dg1,dg2 etc – AndyC Dec 9 at 17:33
if you could confirm this question as answered and mark this as an answer that would be cool. – Glycerine Dec 19 at 18:20
vote up 0 vote down

Yep your answer was great. How do I go about marking it though?

link|flag
Hey buddy - You should see a little tick next to the answer - this'll tell all this question has been answered. I'm glad it helped - ASK MORE QUESTIONS. – Glycerine Mar 16 at 11:56

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.