I tried a little test based on my suggestion where during a dg 
change event i popped up the menu. the menu was populated using 
event.target.selectedItem .and it works fine. 
eg 
<mx:DataGrid change="doChange(event)">

function doChange(event){

var myMenu = Menu.createMenu(this,null);
// populated dataprovider like in my previous post etc 

}

i think your problem might be something that i was having problems 
with last week. if your menu dataprovider is valid and everything 
else is okay, maybe you need to wait a couple of frames before you 
can show the menu. use a doLater() to show the menu.



--- In [email protected], "Jonathan Miranda" 
<[EMAIL PROTECTED]> wrote:
>
> Again, no luck with this. I think it's something wrong with 
the "change"
> tag in the DataGrid.....I put a Canvas object in the root and made 
it my
> container to pass in. Button "click" works, Datagrid "change" does 
not.
> 
>  
> 
> Anyone successfully got a menu to popup with a change event?
> 
> _________________________________________
> 
> Jonathan Miranda
> 
> Flexible Master of the Web
> 
>  
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of bhaq1972
> Sent: Tuesday, January 31, 2006 8:18 AM
> To: [email protected]
> Subject: [flexcoders] Re: Return of the Menu Depth Monster!
> 
>  
> 
> maybe your menu dataprovider needs to be added another way
> you could try the following
> 
> myMenu = Menu.createMenu(myApp, null);
> 
> //populate dataprovider
> for (var obj in myEMP2Service.result.query.row)
> {
>   myMenu.addMenuItem(myEMP2Service.result.query.row[obj]);
> }
> myMenu.show(200, 10);
> 
> or if your row is can be made into an xml string eg
> var dp:XML = new XML();
> dp.parseXML(xmlstring);//xmlstring=your row
> 
> myMenu = Menu.createMenu(myApp, dp);
> 
> just some ideas.
> bod
> 
> 
> 
> 
> 
> 
> --- In [email protected], "Jonathan Miranda" 
> <[EMAIL PROTECTED]> wrote:
> >
> > I tried setting my mx:Application with an id of "myApp" and 
> sending that
> > into the createMenu call. Works fine again with the 
button....not 
> on the
> > change event for the Datagrid.
> > 
> > Has anyone successfully gotten a menu to work on a "change" 
event 
> for
> > Datagrid?
> > 
> >  
> > 
> >  
> > 
> > _________________________________________
> > 
> > Jonathan Miranda
> > 
> > Flexible Master of the Web
> > 
> >  
> > 
> > From: [email protected] 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Deepa Subramaniam
> > Sent: Friday, January 27, 2006 6:21 PM
> > To: [email protected]
> > Subject: RE: [flexcoders] Return of the Menu Depth Monster!
> > 
> >  
> > 
> > Have you tried parenting the Menu to the Application or some
> > higher-level container (ie: pass a container instead of null as 
the
> > first argument in createMenu())? 
> > 
> >  
> > 
> > __________________
> > 
> > Find Me: 
> > 
> >   2701 - 601 Townsend
> > 
> >   415.832.7668
> > 
> >   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
> > 
> >  
> > 
> > -----Original Message-----
> > From: [email protected] 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Jonathan Miranda
> > Sent: Friday, January 27, 2006 3:27 PM
> > To: [email protected]
> > Subject: [flexcoders] Return of the Menu Depth Monster!
> > 
> >  
> > 
> > Alright, after reading through all the archives, cflex.net and
> > google...I've come to the conclusion I can't solve my issue :-) 
I 
> have a
> > super basic menu function.
> > 
> > public function showMenu() {
> > 
> >       myMenu = Menu.createMenu(null, 
> myEMP2Service.result.query.row);
> > 
> >       myMenu.show(200, 10);
> > 
> >       Alert.show("trace: "+myMenu,"hey!",Alert.OK);
> > 
> > }
> > 
> >  
> > 
> > I call this from a button on my movie.
> > 
> >  
> > 
> > <mx:Button id="clickBtn" label="Add Note" click="showMenu
()"/>    
> > 
> > It works and I see the alert. Now I do the same with a datagrid, 
> right
> > after the button, in the same element/level in the movie.
> > 
> > <mx:DataGrid id="AFTAsDG" width="100%" height="95%"
> > dataProvider="{myAFTAService.result.query.row}" change="showMenu
> ()">
> > 
> >  
> > 
> > No menu! But the alert shows the menu exists! No matter where I 
> move it,
> > it doesn't show up. Can you not do menus on changeEvents for 
> Datagrids?
> > I'm assuming it's a depth issue of some sort...ideas?
> > 
> > Jonathan Miranda
> > 
> > 
> > 
> > 
> > --
> > 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 
> > 
> >  
> > 
> > *      Visit your group "flexcoders
> > <http://groups.yahoo.com/group/flexcoders> " on the web.
> >         
> > *      To unsubscribe from this group, send an email to:
> >       [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]
> subject=Unsubscribe> 
> >         
> > *      Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of
> > Service <http://docs.yahoo.com/info/terms/> . 
> > 
> >  
> > 
> > ________________________________
> >
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
> 
> 
> 
> SPONSORED LINKS 
> 
> Web site design development
> <http://groups.yahoo.com/gads?
t=ms&k=Web+site+design+development&w1=Web+
> 
site+design+development&w2=Computer+software+development&w3=Software+
des
> 
ign+and+development&w4=Macromedia+flex&w5=Software+development+best+p
rac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>  
> 
> Computer software development
> <http://groups.yahoo.com/gads?
t=ms&k=Computer+software+development&w1=We
> 
b+site+design+development&w2=Computer+software+development&w3=Softwar
e+d
> 
esign+and+development&w4=Macromedia+flex&w5=Software+development+best
+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>  
> 
> Software design and development
> <http://groups.yahoo.com/gads?
t=ms&k=Software+design+and+development&w1=
> 
Web+site+design+development&w2=Computer+software+development&w3=Softw
are
> 
+design+and+development&w4=Macromedia+flex&w5=Software+development+be
st+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>  
> 
> Macromedia flex
> <http://groups.yahoo.com/gads?
t=ms&k=Macromedia+flex&w1=Web+site+design+
> 
development&w2=Computer+software+development&w3=Software+design+and+d
eve
> 
lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&
s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw>  
> 
> Software development best practice
> <http://groups.yahoo.com/gads?
t=ms&k=Software+development+best+practice&
> 
w1=Web+site+design+development&w2=Computer+software+development&w3=So
ftw
> 
are+design+and+development&w4=Macromedia+flex&w5=Software+development
+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>  
> 
>  
> 
>  
> 
> ________________________________
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>         
> *      To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]
subject=Unsubscribe> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
> ________________________________
>






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