<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using a custom context menu with the Flex DataGrid control</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 15 Mar 2010 14:31:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6610</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 15 Dec 2009 14:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6610</guid>
		<description>@Tim Romano,

Feel free to file a bug/enhancement request at http://bugs.adobe.com/flex/ if you think the AIR behavior should be changed. Or, you can also file Adobe AIR bugs/enhancements at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform and select &quot;Adobe AIR&quot; from the drop down menu.

Peter</description>
		<content:encoded><![CDATA[<p>@Tim Romano,</p>
<p>Feel free to file a bug/enhancement request at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> if you think the AIR behavior should be changed. Or, you can also file Adobe AIR bugs/enhancements at <a href="https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform" rel="nofollow">https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform</a> and select &#8220;Adobe AIR&#8221; from the drop down menu.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Romano</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6609</link>
		<dc:creator>Tim Romano</dc:creator>
		<pubDate>Tue, 15 Dec 2009 14:21:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6609</guid>
		<description>There are different capabilities regarding custom context menus in AIR apps versus browser-deployed Flex apps.  AIR actually has some very serious limitations that the browser-deployed Flex apps do not have.  Ironic that the browser app would be &quot;richer&quot; in this respect than the AIR app, but it is documented. Flex browser-based apps have limits on the number of custom items in the context-menu..  AIR apps are limited as to which controls can have a custom context menu in the first place. As of FB3, in AIR the component to which the custom context-menu is being attached must be top-level.  This limitation makes custom context-menu support in AIR almost useless, IMO.</description>
		<content:encoded><![CDATA[<p>There are different capabilities regarding custom context menus in AIR apps versus browser-deployed Flex apps.  AIR actually has some very serious limitations that the browser-deployed Flex apps do not have.  Ironic that the browser app would be &#8220;richer&#8221; in this respect than the AIR app, but it is documented. Flex browser-based apps have limits on the number of custom items in the context-menu..  AIR apps are limited as to which controls can have a custom context menu in the first place. As of FB3, in AIR the component to which the custom context-menu is being attached must be top-level.  This limitation makes custom context-menu support in AIR almost useless, IMO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6589</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Sun, 13 Dec 2009 15:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6589</guid>
		<description>a really simple and good working solutionfor this problem  ... once more thanx</description>
		<content:encoded><![CDATA[<p>a really simple and good working solutionfor this problem  &#8230; once more thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oluwaseun</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6556</link>
		<dc:creator>oluwaseun</dc:creator>
		<pubDate>Tue, 08 Dec 2009 12:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6556</guid>
		<description>When a user double-clicks a row, the row should be replaced by a vbox that displays the detail of the row selected and this should be done at the point of the row selected i.e. inline. Has anyone any idea how I could get this done.</description>
		<content:encoded><![CDATA[<p>When a user double-clicks a row, the row should be replaced by a vbox that displays the detail of the row selected and this should be done at the point of the row selected i.e. inline. Has anyone any idea how I could get this done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SenorPlankton</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6403</link>
		<dc:creator>SenorPlankton</dc:creator>
		<pubDate>Thu, 19 Nov 2009 14:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6403</guid>
		<description>A good example, thanks. 

A couple of points though -
1. To make this work in an AIR app, you need to assign the context menu to the grid programmatically, eg: by adding &lt;code&gt;dataGrid.contextMenu = cm;&lt;/code&gt; to the end of the init() function. 
2. It might make more sense to read the data from &lt;code&gt;dataGrid.dataProvider[lastRollOverIndex]&lt;/code&gt;, rather than setting the datagrid&#039;s index every time you right click.</description>
		<content:encoded><![CDATA[<p>A good example, thanks. </p>
<p>A couple of points though -<br />
1. To make this work in an AIR app, you need to assign the context menu to the grid programmatically, eg: by adding &lt;code&gt;dataGrid.contextMenu = cm;&lt;/code&gt; to the end of the init() function.<br />
2. It might make more sense to read the data from &lt;code&gt;dataGrid.dataProvider[lastRollOverIndex]&lt;/code&gt;, rather than setting the datagrid&#8217;s index every time you right click.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6366</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Mon, 16 Nov 2009 09:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6366</guid>
		<description>don&#039;t bother found it, i had to add contextMenu=&quot;{cm}&quot; to the application instead of the grid</description>
		<content:encoded><![CDATA[<p>don&#8217;t bother found it, i had to add contextMenu=&#8221;{cm}&#8221; to the application instead of the grid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-6365</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Mon, 16 Nov 2009 09:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-6365</guid>
		<description>is it possible to customize the right click menu of an application not a grid?
Thanks</description>
		<content:encoded><![CDATA[<p>is it possible to customize the right click menu of an application not a grid?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-4562</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Tue, 14 Jul 2009 18:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-4562</guid>
		<description>Nice work Peter,  I implemented it without any problem.  Having said that - I originally had a double click event that opened a TitleWindow. I needed another event handler  so I implemented the ContextMenu with a &quot;View&quot; and &quot;Edit&quot; event. Both of these work fine; however I lost my doubleClick event on the grid itself. Any suggestions?

My  Syntax:
&lt;pre lang=&quot;actionscript3&quot;&gt;
private function init():void {
            var cmiView:ContextMenuItem = new ContextMenuItem(&quot;View Member Information...&quot;, true);
            cmiView.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cmiViewRecord);
            var cmiEdit:ContextMenuItem = new ContextMenuItem(&quot;Edit Member Information...&quot;, true);
            cmiEdit.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cmiEditRecord);

            cm = new ContextMenu();
            cm.hideBuiltInItems();
            cm.customItems = [cmiView,cmiEdit];
            cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelect);
}

private function cmiEditRecord(event:ContextMenuEvent):void {
        	var theSource:String = &quot;MemberProfile.cfm?ID=&quot; +     
                                    resultsArray[memberGrid.selectedIndex].MEMBER_ID;
        	var urlToNav:URLRequest = new URLRequest(theSource);
        	navigateToURL(urlToNav,&quot;_self&quot;);
}
    
private function cmiViewRecord(event:ContextMenuEvent):void {
        	Application.application.showMemberView(resultsArray[memberGrid.selectedIndex].MEMBER_ID);
 }

private function contextMenu_menuSelect(evt:ContextMenuEvent):void {
            memberGrid.selectedIndex = lastRollOverIndex;
}
&lt;/pre&gt;

And of course my grid

&lt;code&gt;

&lt;/code&gt;

Thanks again for your generosity</description>
		<content:encoded><![CDATA[<p>Nice work Peter,  I implemented it without any problem.  Having said that &#8211; I originally had a double click event that opened a TitleWindow. I needed another event handler  so I implemented the ContextMenu with a &#8220;View&#8221; and &#8220;Edit&#8221; event. Both of these work fine; however I lost my doubleClick event on the grid itself. Any suggestions?</p>
<p>My  Syntax:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #6699cc; font-weight: bold;">var</span> cmiView<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuItem</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenuItem</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;View Member Information...&quot;</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
            cmiView.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">ContextMenuEvent</span>.<span style="color: #004993;">MENU_ITEM_SELECT</span>, cmiViewRecord<span style="color: #000000;">&#41;</span>;
            <span style="color: #6699cc; font-weight: bold;">var</span> cmiEdit<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuItem</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenuItem</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Edit Member Information...&quot;</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
            cmiEdit.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">ContextMenuEvent</span>.<span style="color: #004993;">MENU_ITEM_SELECT</span>, cmiEditRecord<span style="color: #000000;">&#41;</span>;
&nbsp;
            cm = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            cm.<span style="color: #004993;">hideBuiltInItems</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            cm.<span style="color: #004993;">customItems</span> = <span style="color: #000000;">&#91;</span>cmiView,cmiEdit<span style="color: #000000;">&#93;</span>;
            cm.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">ContextMenuEvent</span>.<span style="color: #004993;">MENU_SELECT</span>, contextMenu_menuSelect<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> cmiEditRecord<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        	<span style="color: #6699cc; font-weight: bold;">var</span> theSource<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;MemberProfile.cfm?ID=&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>     
                                    resultsArray<span style="color: #000000;">&#91;</span>memberGrid.selectedIndex<span style="color: #000000;">&#93;</span>.MEMBER_ID;
        	<span style="color: #6699cc; font-weight: bold;">var</span> urlToNav<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLRequest</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span>theSource<span style="color: #000000;">&#41;</span>;
        	<span style="color: #004993;">navigateToURL</span><span style="color: #000000;">&#40;</span>urlToNav,<span style="color: #990000;">&quot;_self&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> cmiViewRecord<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        	Application.application.showMemberView<span style="color: #000000;">&#40;</span>resultsArray<span style="color: #000000;">&#91;</span>memberGrid.selectedIndex<span style="color: #000000;">&#93;</span>.MEMBER_ID<span style="color: #000000;">&#41;</span>;
 <span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> contextMenu_menuSelect<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            memberGrid.selectedIndex = lastRollOverIndex;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>And of course my grid</p>
<p><code></p>
<p></code></p>
<p>Thanks again for your generosity</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-4272</link>
		<dc:creator>om</dc:creator>
		<pubDate>Tue, 30 Jun 2009 09:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-4272</guid>
		<description>This does not work in Air.
If the context menu is opened and the user right-clicks on an other item, the item is not selected as the itemRollOver event is not dispatched :(

Anyone has a solution to this problem ?</description>
		<content:encoded><![CDATA[<p>This does not work in Air.<br />
If the context menu is opened and the user right-clicks on an other item, the item is not selected as the itemRollOver event is not dispatched :(</p>
<p>Anyone has a solution to this problem ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RajPrabha</title>
		<link>http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/comment-page-1/#comment-751</link>
		<dc:creator>RajPrabha</dc:creator>
		<pubDate>Mon, 27 Apr 2009 04:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/#comment-751</guid>
		<description>Sorry..forgot to send the link
http://kuvempu.wordpress.com/context-menu-in-air/
Try this</description>
		<content:encoded><![CDATA[<p>Sorry..forgot to send the link<br />
<a href="http://kuvempu.wordpress.com/context-menu-in-air/" rel="nofollow">http://kuvempu.wordpress.com/context-menu-in-air/</a><br />
Try this</p>
]]></content:encoded>
	</item>
</channel>
</rss>
