The RemoteObject is returning simple database values which is why it is the provider for the datagrid. cvcontactID is a primary key and I have set the visible value to false in the datagrid. When someone selects a row I simply want to return the value within the hidden cvcontactID datagrid column for the selected row.
I guess I could cheat and make the column visible, grab the value, and then set visible to false, but that seems silly. --- In [email protected], "Pan Troglodytes" <[EMAIL PROTECTED]> wrote: > > How about an example result from your RemoteObject? > > On 7/25/06, michrx7 <[EMAIL PROTECTED]> wrote: > > > > <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" > > <chimpathetic@> 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? > > > > > > > > > > > > > > > > > > > -- > > 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 > > > > > > > > > > > > > > > > > -- > Jason > ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/3EuRwD/bOaOAA/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/

