Hi,

 I am having problem with dispatch event.

 I have a titlewindow (UpdateMarketRequest) from where one click of a
button I open another window (findOrders) which contains a datagring
with a button cell renderer which on click I dispatch and event.

In UpdateMarketRequest  script file I have 

popup = mx.managers.PopUpManager.createPopUp(this, FindEtsOrders,
false, {deferred: true, mrId:this.mrId});
popup.addEventListener("orderSavedEvent", this);

function orderSavedEvent(event) {
    mx.controls.Alert.show("DeleteWindow");
    popup.deletePopUp();
}

In findOrders I have

<mx:DataGrid id="EtsOrderResults"
dataProvider="{mx.utils.ArrayUtil.toArray(findEtsOrdersId.result.EtsOrders.EtsOrdersRow)}"
height="100%" width="100%" toolTip="Ets Orders" borderStyle="solid"
hScrollPolicy="on" editable="false" vScrollPolicy="on"
sortableColumns="true" >
<mx:columns>
<mx:Array>
<mx:DataGridColumn columnName="OrderNumber" headerText="ORDER NUMBER"
fontSize="10" sortable="true" textAlign="left" width="150"
marginLeft="20"/>
<mx:DataGridColumn columnName="OrderName" headerText="ORDER NAME"
fontSize="10" sortable="true" textAlign="left" width="625"
marginLeft="20"/>
<mx:DataGridColumn columnName="OrderStatus" headerText="ORDER STATUS"
fontSize="10" sortable="true" textAlign="left" width="125"
marginLeft="20"/>
<mx:DataGridColumn columnName="OrderId" headerText="" marginLeft="4"
fontSize="10" cellRenderer="AddOrderToMRButtonRenderer"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>

And in the AddOrderToMRButtonRenderer cell renderer

function successfullyAdded(event)
{
mx.core.Application.alert("Order Added ");
dispatchEvent({type:'orderSavedEvent'})
}

I do not think the event is sent.. since I do not see the alert from 

UpdateMarketRequest  ...orderSavedEvent method.

what am I doing wrong? Can I not dispatch from a cellrendere?

thanx in advance

Rajesh J





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hg9h3n9/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123028007/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

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