Flex 3 give DataGrid Data to function

Posted by codeworxx on Stack Overflow See other posts from Stack Overflow or by codeworxx
Published on 2009-12-16T14:30:48Z Indexed on 2010/05/20 20:00 UTC
Read the original article Hit count: 263

Filed under:
|
|

Hey Guys,

i have a Problem to send a value from the DataGrid to a function- this is my function:

private function browseLoc( location:String ):void { Alert.show(location,'Information'); }

Now i have my DataGrid which receives Information from an XML File. Everything works fine. All Information is shown correctly with that Tags:

<mx:Image x="10" y="346" width="157" height="107" scaleContent="true" source="{codeworxx.pages.page[selectedPageIndex].preview}"/>
<mx:Label x="10" y="492" width="157" fontWeight="bold" text="{codeworxx.pages.page[selectedPageIndex].visible}"/>
<mx:Text x="10" y="513" width="157" text="{codeworxx.pages.page[selectedPageIndex].description}"/>
<mx:Button x="10" y="461" label="Visit Website" width="159" click="browseLoc('{codeworxx.pages.page[selectedPageIndex].url}')"/>

except the Button. The Function "browseLoc" only has the text {codeworxx.pages.page[selectedPageIndex].url} in it - not the value. How do i do it?

Hope you can help!

Thanks, Sascha

© Stack Overflow or respective owner

Related posts about adobe

Related posts about flex3