If your CheckBox is an ItemRenderer, each instance will have access to the
data for the entire row. Depending on the scope of your var dsplValue and var
dataValue, you should easily be able to add a "change" event handler on the
checkbox that calls a function to set these values: inline example stub

<mx:DataGridColumn....>
  <component>
    <mx:CheckBox change="setVals()" selected="{data.CBColumnVar}">
      <mx:Script>
        <![CDATA[
          private function setVals():void{
            if ( this.selected ){
             ModelLocator.getInstance().dsplValue  = data.dsplValueColumnVar;
//or however you reference your VARs

On Tue, Mar 17, 2009 at 2:35 PM, Frank Griffin <[email protected]>wrote:

>  Group,
>
>
>
> Can someone point me to a code sample for a handler that maintains a VAR
> based on the on change of a checkbox? I think I understand how to add to a
> VAR but I can’t find an example of removing from a VAR.
>
>
>
> 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 Example: Data Value: ‘001’, ‘002’, ‘003’, ‘004’
>
>
>
>
>
>
>
> Your assistance is much appreciated.
>
>
>
>
>
> Frank Griffin
>
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------




-- 
Darin Kohles
RIA Developer

Reply via email to