That syntax has always been a shortcut for …partyDG.dataProvider.addItem, and the shortcut syntax has been removed from 2.0.

 

So go through the dataProvider property like above.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jeremy Rottman
Sent: Friday, July 07, 2006 11:56 AM
To: [email protected]
Subject: [flexcoders] Adding an item to a dg

 

I am working with my party manager, I finally got it laid out correctly.
However, I have ran into one last problem, when a user finds the party
they want to tag to the file, I am trying to populate the party display
DG with the party they just added. However, I think I am going about
this the wrong way. I am trying to do this with out having to use an
array collection. I want to add directly to the dg.

This is the code that I am trying.

// CALL LISTING ADD AGENT METHOD
private function
PartyManager_Listing_Add_Agent(fileNum,uuid,name){
PartyManager.Listing_Add_Agent(fileNum, uuid,name)
}

// HANDLE LISTING ADD AGENT METHOD
private function
PartyManager_Listing_Add_Agent_Result(result):void{
Alert.show(result);

parentApplication.mainDisplay.ntcl.partyDG.addItem({partyName:agentSearc\
hDG.selectedItem.FLD_AGENTFULLNAME})
}

// HANDLE LISTING ADD AGENT ERRORS
private function
PartyManager_Listing_Add_Agent_Fault(event:FaultEvent):void{
Alert.show("Test Error","Program Error")
}

This is the error that I am getting.

ReferenceError: Error #1069: Property addItem not found on
mx.controls.DataGrid and there is no default value.
at
components.views.transactions.widgets::actionNewListAgentPanel/::PartyMa\
nager_Listing_Add_Agent_Result()
at
components.views.transactions.widgets::actionNewListAgentPanel/___Operat\
ion4_result()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
tFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::di\
spatchRpcEvent
()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu\
ltHandler
()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::DirectHTTPMessageResponder/completeHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
tFunction()

__._,_.___

--
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




__,_._,___

Reply via email to