PDA

View Full Version : Maintaining a VAR with a Handler


fgriffin
03-17-2009, 09:32 PM
I am new to Flex and I am having a problem with maintaining a VAR.

Can someone point me to a code sample for a handler that maintains a VAR based
on the on change of a checkbox?

Use Case: I have a datagrid with three columns where the first column is a
checkbox named "Selected", the second column named "Display Value" and the last
named "Data Value". When a user checks the checkbox I need to add the value of
the other two row cells to their respective VARS (var dsplValue for "Display
Value" and var dataValue for "Data Value"). Conversely, when a user unselects a
checkbox I need to remove the respective values in the two VARs.

Data Examples:

"Display Value" = Orlando
"dispValue" = "Atlanta", "New York"
"Data Value" = 004
"dataValue" = '001', '002', '003'

Best regards,

Frank G.

EndlessLine
03-18-2009, 10:35 PM
You get the values from whatever dataprovider you are using. Post yeer code and I may be able to help

Peter Cowling
03-20-2009, 01:03 AM
Datagrid:

Checkboxes (http://blogs.adobe.com/aharui/2008/02/checkbox_selection_in_datagrid.html)

row based information (http://polygeek.com/528_flex_getting-data-of-the-selected-row-in-a-datagrid-component).