change datagrid column to hyperlink

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default change datagrid column to hyperlink

    Hi All,

    I have a datagrid and am autogenerating columns. I would like one of
    the columns to be a hyperlink column after the data has been bound
    i.e. I already have a column with the data in it (a name) and I want
    it to be converted to a hyperlink. Is it possible to do this at
    runtime?

    thanks

    Claire
    Claire Reed Guest

  2. Similar Questions and Discussions

    1. Hyperlink template column and change link text based on Condition
      How do I create a Hyperlink column in a Datagrid which launches a pop-up window, and have the text in the hyperlink change based on a condition? I'm...
    2. Hyperlink column in datagrid
      I am trying to insert a hyperlink column in a datagrid the field consist of a http://www.something.no/text.asp?id=FieldID where FieldID is the...
    3. color of hyperlink column of datagrid
      Hi, I have a web page which written by ASP.net. The page contains a datagrid. Inside a datagrid, there is a hyperlink column. When user...
    4. Getting ID from Datagrid hyperlink column
      I have a datagrid containing a column: <asp:Hyperlinkcolumn headertext="View/Edit" Datanavigateurlfield="individualid"...
    5. Dynamic DataGrid Hyperlink column
      Is there a way to dynamically set the field DataNavigateUrlFormatString in a hyperlink column of a datagrid? Currently, if a user clicks on the...
  3. #2

    Default Re: change datagrid column to hyperlink

    I don't think you can do this with columns generated at runtime.

    What you can do, is have sql like: select '<a href="' + MyUrlColumn + '">'
    + MyUrlColumn + '</a>' as 'The Link' from MyTable

    This basically builds an <a> link in the SQL itself, and since the datagrid
    treats and text as HTML, this will display a link.

    "Claire Reed" <clairereedo@yahoo.co.uk> wrote in message
    news:c64fb943.0308040831.6b4b6d1c@posting.google.c om...
    > Hi All,
    >
    > I have a datagrid and am autogenerating columns. I would like one of
    > the columns to be a hyperlink column after the data has been bound
    > i.e. I already have a column with the data in it (a name) and I want
    > it to be converted to a hyperlink. Is it possible to do this at
    > runtime?
    >
    > thanks
    >
    > Claire

    Marina Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139