1 Reply Latest reply on Jan 19, 2011 4:59 AM by Pol-suma

    On mouseover of Advanceddatagrid each cell data should get underlined




      I have an issue regarding advanceddatagrid, Issue is,


      When I mouseover on each cell data(single cell data) it should get underlined and inturn when clicked on it an alert should get displayed, example like it should act like a link button.


      Can anybody please help me in solving this issue.


      Thanks ,



        • 1. Re: On mouseover of Advanceddatagrid each cell data should get underlined
          Pol-suma Level 1

          I have got underlining the cell data on mouseover, but I am not able to get an alert on clicking on it..I have to get an alert on click on each cell item of advanceddatagrid.


          my actionscript code is as follows..



          import flash.events.MouseEvent;

          import mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer;

          import mx.controls.AdvancedDataGrid;

          public class underlinerenderer extends AdvancedDataGridItemRenderer
            public  function underlinerenderer()
             this.addEventListener(MouseEvent.MOUSE_OUT, clearUnderline);
            private function showUnderline(evt:MouseEvent):void
               this.setStyle("textDecoration", "underline");
          private function clearUnderline(evt:MouseEvent):void
              this.setStyle("textDecoration", "none");



          mxml code:


          <mx:AdvancedDataGrid id="adv" dataProvider="{dpFlat}" rowCount="{dpFlat.length}" height="30%" horizontalCenter="-301"
             verticalCenter="-182"  itemRenderer="underlinerenderer">
             <mx:AdvancedDataGridColumn id="Col1" dataField="Region"  />
             <mx:AdvancedDataGridColumn dataField="Actual"/>
             <mx:AdvancedDataGridColumn dataField="Territory"/>


          Using this I can get the data in each cell underlined on mouseover...But how to get an alert on clicking on it...?