1 Reply Latest reply on Sep 3, 2008 6:21 AM by darbus23

    cfgrid problem

    slykiwi Level 1
      Hi All,

      I am using a cfgrid bound to a cfc to populate it with data in CF8. All is working well.
      One of the columns in the grid contains a string which are urls without the "http : // www."
      All I want to be able to do is to allow users to click on these links so they are taken to the page.
      In the cfgrid I have "appendkey=no" so no url vars are added, and in the cfgridcolumn tag I have the href attribute "href=pmcname" which is the column var containg the links.

      But....of course without the " http : //www."the links are going nowhere (or a trying tio find the link as a page on my own domain). I know I could add the prefix after the query in the cfc but I don't want to display the prefix in the table.

      Any ideas please?

        • 1. Re: cfgrid problem
          In your Select in the CFC select an additional column that is strung together with the http://www. like so...

          SELECT ' http://www.' + LINK AS URL_LINK

          Then add the URL_LINK as a grid column but set it to not display.
          <cfgridcolumn name="URL_LINK" header="URL_LINK" display="no" />

          Finally, set the href for the column that you want to be linked to "URL_LINK"