2 Replies Latest reply on Apr 5, 2010 1:59 PM by knowFlex

    accessing the right click value



      I am having a datagrid with context menu. On right clicking a particular row, i want to access the value of the row.





        • 1. Re: accessing the right click value
          david.t.lanton Level 1

          Please show us some of the code you've got so far. People will be more willing to help you this way, because it's a lot easier to add the parts you need than to write it all for you.

          • 2. Re: accessing the right click value
            knowFlex Level 1

            here is my code



            private function init():void{

            var cmi:ContextMenuItem = new ContextMenuItem("Browse Queue", true);

            cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, browseMessageMenu);

            cm = new ContextMenu();


                        cm.customItems = [cmi];



            private function browseMessageMenu(ev:ContextMenuEvent):void{


            //here i am trying to access the row on which right click event happened



            <mx:DataGrid id="dgQueueList" dataTipField="qName" toolTip="right Click on the row to see more options" dataProvider="{myData}"

            width="600" y="10" alpha="1.0"  alternatingItemColors="[#FFFFFF, #D5E3F4]" includeInLayout="false"

            rowCount="{myData.length}" contextMenu="{cm}" selectionColor="#6fc0f3" rollOverColor="#B5E4F8" themeColor="#CDEBFE">