2 Replies Latest reply on Jun 10, 2008 3:54 AM by nu2cf

    HTMLText in a datagrid

      I have a return from a webservice that contains links. I need to output the webservice returns in a datagrid but still maintain the ability to click the links. The webservice output looks like this:

      text_ad_promotionType_tx = "coupon"
      text_ad_linkCodeHTML_tx = "<a href=" http://www.tkqlhce.com/click-2120973-10459881"> Save $5.00 on your Wireless Music System with coupon code 34679 </a>
      <img src=" http://www.ftjcfx.com/image-2120973-10459881" width="1" height="1" border="0"/>"

      I've Googled and search this forum but can't find a solution. Can anyone help?
        • 1. Re: HTMLText in a datagrid
          Garyl Woolworth Level 1
          Is there any reason you have to use a datagrid control to accomplish this task compared to a repeater? The reason I ask this is if you have html text within an itemRenderer in a datagrid it takes two clicks for a link to work, one to select the item, and the second opens the link. You could probably get around this but I would think using a repeater would produce a better result unless there is a specific reason you need to use a datagrid. An example is posted of the double click.
          • 2. Re: HTMLText in a datagrid
            nu2cf Level 1
            The datagrid will also have storeName, promotionEndDate, promotionStartDate, etc. I thought the datagrid would allow for better sorting and filtering. I do like your thoughts on a repeater and I like the 'one click'.

            I also am trying to find a method to detect all external links and have them open in a new window. Possibly this would be easier to accomplish.