Jump to content



Photo

Personalising Pop-Ups


  • Please log in to reply
3 replies to this topic

#1 russellt

russellt

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 30 March 2011 - 4:57 AM

Larry,
Am a complete n00b to Flex/Actionscript but have diligently worked through the book, and am now starting to play with the technology. So go easy on me :-)

My question:
Am using Zend AMF on Wampserver to populate a DataGrid. I have a doubleClick event which, when the user doubleclicks a row on the datagrid, initialises the variable selectedRow:Object and opens a simple pop-up(Form, FormHeading, FormItem, TextInput and Button).

I would like to take the data from a cell in the doubleclicked row eg selectedRow.description and add it to the FormHeading label of the pop-up, so that when the pop-up opens, the description cell from the row selected on the datagrid is displayed in the pop-up heading.

I have made the variable 'selectedRow' bindable and am trying to insert {selectedRow.description} into the FormHeading label - somthing like <mx:FormHeading label = "This is the description + {selectedRow.description} "> in the pop-up, but no luck.

No doubt, a n00b error. I'd welcome your thoughts.

thx,

russellt

mysql 4.1.14
php 5.2.12
wampserver 2.1
flashbuilder 4.0
  • 0

#2 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,801 posts
  • LocationState College, PA (USA)

Posted 6 April 2011 - 8:08 PM

When you say you made the variable bindable and such, could you share some of the actual code (not all of it, but the most relevant parts)?
  • 0

#3 russellt

russellt

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 8 April 2011 - 3:44 AM

Larry,
No worries. I found a way to make it work: + datagrid.selectedItem.description + seems to work using Alert.show inside a doubleClickHandler function.

It's a cool technology, but not immediately intuitive. Lots of trial & error for me, so far :-)
  • 0

#4 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,801 posts
  • LocationState College, PA (USA)

Posted 8 April 2011 - 10:16 AM

Well, I'm glad you figured it out and thanks for letting me know. Yes, Flex is pretty good stuff. Glad you think so, too!
  • 0