Flex 4 advanced data grid update problem

tweensteeples
tweensteeples used Ask the Experts™
on
I have two problems with updating the dataprovider and the grid itself.
Problem 1:
I am receiving the following error:
Description      Resource      Path      Location      Type
1120: Access of undefined property Investigators

the problem is generated when I attempt to enter in the item to be updated in the function listed below labeled "WHATGOESHERE".  

      protected function button_clickHandler(event:MouseEvent):void
                  {
                        updateInvestigatorsResult.token = investigatorsService1.updateInvestigators(WHATGOESHERE)
                        }

Problem 2:
I am also unable to update the bound grid to display new or edited data. If I refresh the browser the newly changed/edited/modified data will show up correctly in the grid but I have been unsuccessful at updating the grid display itself to reflect the changes.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/halo" 
			   minWidth="1024" minHeight="768" 
			   xmlns:investigatorsservice="services.investigatorsservice.*" xmlns:valueObjects="valueObjects.*" xmlns:investigatorsservice1="services.investigatorsservice1.*">
	<fx:Script>
		<![CDATA[
			import mx.events.FlexEvent;
			import mx.controls.Alert;

			protected function dropDownList_creationCompleteHandler(event:FlexEvent):void
			{
				getAllInvestigatorsResult.token = investigatorsService1.getAllInvestigators();
			
			}


			protected function button_clickHandler(event:MouseEvent):void
			{
				updateInvestigatorsResult.token = investigatorsService1.updateInvestigators(Investigators)
				}
		]]>
	</fx:Script>
	<fx:Declarations>
		<s:CallResponder id="getAllInvestigatorsResult" />
		<investigatorsservice1:InvestigatorsService1 
			id="investigatorsService1" 
			fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" 
			showBusyCursor="true" 
			/>
		<valueObjects:MyArrayCollection id="myArrayCollection" investigator_id="{parseInt(investigator_idTextInput.text)}"/>
		<s:CallResponder id="updateInvestigatorsResult"/>
	</fx:Declarations>
	<fx:Binding source="dropDownList.selectedItem as MyArrayCollection" destination="myArrayCollection"/>
	<s:DropDownList x="31" y="88" 
					id="dropDownList" 
					creationComplete="dropDownList_creationCompleteHandler(event)" 
					dataProvider="{getAllInvestigatorsResult.lastResult}" 
					selectedIndex="1"
					labelField="fname"></s:DropDownList>
	<mx:Form x="151" y="89">
		<mx:FormItem label="Lname">
			<s:TextInput id="lnameTextInput" text="@{myArrayCollection.lname}"/>
		</mx:FormItem>
		<mx:FormItem label="Fname">
			<s:TextInput id="fnameTextInput" text="@{myArrayCollection.fname}"/>
		</mx:FormItem>
		<mx:FormItem label="Investigator_id">
			<s:TextInput id="investigator_idTextInput" text="{myArrayCollection.investigator_id}"/>
		</mx:FormItem>
	</mx:Form>
	<s:Button x="151" y="252" label="Button" id="button" click="button_clickHandler(event)"/>
	</s:Application>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
updateInvestigatorsResult.token = investigatorsService1.updateInvestigators(investigatorsService1);
oops, sorry, that was meant to be:

updateInvestigatorsResult.token = investigatorsService1.updateInvestigators( investigator_idTextInput.text);
for Q2 post the code showing the datagrid plz

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial