Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Creating hyperlink in Flex datagrid

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Creating hyperlink in Flex datagrid
 Login/Join
 
Member
posted
I have a Flex datagrid with one field called DSP_WEBSITE that contains a url. It displays correctly but I don't know how to make it an active hyperlink to open in a new window to display the url website. I also have the same issue in the ibiInfoWindowColumns.

Any suggestions?

Here is my code now:

ibi:ibiUseColumnsDSP_NAME AS Provider,COUNTRY AS Country,DSP_WEBSITE AS Website,DSP_RATING AS Rating,LATITUDE,LONGITUDE

This message has been edited. Last edited by: LDW,


7.6.8
Windows xp
html
 
Posts: 22 | Location: Minneapolis, MN | Registered: January 24, 2008Report This Post
Master
posted Hide Post
To Accomplish what you are asking for must currently be done using Action Script. it is a simple 3 step process.

Step 1.) Add an itemClick event to the ibiDataGrid. you can just copy what I have posted below you you ibiDataGrid.

itemClick="itemClickEvent(event)"

Making your ibiDataGrid look somethigng like this.

<ibi:ibiDataGrid x="10" y="10" width="712" height="169" id="MainDG" itemClick="itemClickEvent(event)" ibiUseColumns="DSP_WEBSITE AS WebSite">


Step 2.) Just copy the below code into your application. If you already have a script section in your application then all you need to copy is the import line and the itemClickEvent function.
<mx:Script>
  <![CDATA[
    import mx.events.ListEvent;

    private function itemClickEvent(event:ListEvent):void 
    {
      if(event.rowIndex >= 0)
        if(event.columnIndex == 0)
          {
            var url:URLRequest = new URLRequest(MainDG.prGridfiltered[event.rowIndex].DSP_WEBSITE); 
            navigateToURL(url,"_blank");
          }
      }
  ]]>
</mx:Script>


Step 3.) Just edit the code from step 2 and change the MainDG to the id of your ibiDataGrid.


Give this a try.

This message has been edited. Last edited by: TexasStingray,




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
Hi -
Thanks for providing this detailed help on drilldown script.

A little variation of this worked for us:
  
<mx:Script>
 <![CDATA[
   import mx.events.ListEvent; 
   import mx.controls.Alert; 
   //import flash.net.navigateToURL;
   
   private function itemClickEvent (event:ListEvent):void 
    { 
     if(event.rowIndex >= 0)
     {
     var url:URLRequest = new URLRequest("http://" + event.currentTarget.selectedItem.DSP_WEBSITE); 
     //var url:URLRequest = new URLRequest("http://" + DATA02.prGridfiltered[event.rowIndex].DSP_WEBSITE);
            navigateToURL(url,'_blank');
          }
      }
  ]]>
</mx:Script>



Would you know why "DATA02.prGridfiltered[event.rowIndex].DSP_WEBSITE" could not work for us..

Thanks much!
-Kal (for LDW)


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;
 
Posts: 33 | Location: MN | Registered: May 17, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Creating hyperlink in Flex datagrid

Copyright © 1996-2020 Information Builders