<mx:Script>
        <![CDATA[
                import mx.controls.Text;
                import mx.collections.ArrayCollection;
                import mx.utils.ObjectUtil;
                import mx.rpc.events.*;
                import mx.controls.Alert;
                import flash.net.*;
         
                [Bindable]
                public var activeMembers:ArrayCollection;

                public function initApp():void
        {
                        myService.getActive();
                }
                
                public function clickHandler():void
                {
                        var myvalueName = 
myGrid.selectedItem.cvcontactID;
                        Alert.show(myvalueName);
                }
                
                private function resultHandler
(event:ResultEvent):void { 
                        activeMembers = event.result as 
ArrayCollection;
                }
         
        ]]>
</mx:Script>

<mx:RemoteObject id="myService" destination="ColdFusion" 
source="admin_rpt_AllMembers" showBusyCursor="true">
   
                <mx:method name="getActive" result="resultHandler
(event)" fault="Alert.show(event.fault.message)"/>

</mx:RemoteObject>

<mx:DataGrid name="myActiveMembers" id="myGrid" width="100%" 
height="90%" dataProvider="{activeMembers}" click="clickHandler()">
      <mx:columns>
         <mx:DataGridColumn headerText="ID" dataField="cvcontactID" 
visible="false"/>
         <mx:DataGridColumn headerText="Company" 
dataField="cvcompanyName"/>
         <mx:DataGridColumn headerText="Last Name" 
dataField="cvcontactLast"/>
         <mx:DataGridColumn headerText="First Name" 
dataField="cvcontactFirst"/>
         <mx:DataGridColumn headerText="City" 
dataField="cvcontactCity"/>
         <mx:DataGridColumn headerText="State" 
dataField="cvstateAB"/>
         <mx:DataGridColumn headerText="Zip" 
dataField="cvcontactZip"/>
         <mx:DataGridColumn headerText="Country" 
dataField="cvcountryName"/>
         <mx:DataGridColumn headerText="Reg" 
dataField="cvcontactmemberReg"/>
         <mx:DataGridColumn headerText="Expires" 
dataField="cvcontactmemberExp"/>
      </mx:columns>
</mx:DataGrid>

--- In [email protected], "Pan Troglodytes" 
<[EMAIL PROTECTED]> wrote:
>
> That doesn't make a lot of sense to me.  SelectedItem will be the 
item in
> the dataprovider, which knows nothing about the grid and which 
fields are
> visible or not.
> 
> Can you post your code?
> 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/WktRrD/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to