1 Reply Latest reply on Apr 8, 2011 6:59 AM by Abhinav Sharma

    Hiperlink in datagrid




      I am using a data grid to display ID, Name, SL #, And IP. I am binding all to get populated over data grid.



      <mx:DataGridColumn width="150"

      headerText="IP Address"

      dataField= "{OA_IP_ADDRESS}" />


      Now I want to make a hyperlink to the IP address, so that it will directly go to the particular IP.


      I didn’t find any solution for this. Your any help is appreciated.




        • 1. Re: Hiperlink in datagrid
          Abhinav Sharma Level 2

          Make a item renderer for that column. Use Link button inside renderer.


          <mx:DataGridColumn headerText="Go to IP" dataField="ipLoc" itemRenderer="linkRenderer" />




          <?xml version="1.0" encoding="utf-8"?>
          <mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml" dataChange="dataChangeHandler()" label="Go to IP"
              click="navigateToURL(new URLRequest(_Link), '_blank')"
                      import mx.utils.StringUtil;
                      [Bindable]private var _Link:String;
                      private function dataChangeHandler():void
                          _Link = data.ipLoc;


          Hope it help.