Display Dynamic hyperlink in the Datagrid

Discussion in 'ASP .Net Datagrid Control' started by Roopashree BR via .NET 247, Apr 26, 2004.

  1. I have a datagrid which is populated with the values from the database and has a column named Description. According to value of Description, the text of the Description is to be changed to hyperlink.
    eg. If its value is XX --- then display hyperlink for this value alone in the column
    Elseif its value is YY --- then display normal label or text.

    Is there any other way than using Datagrid to accomplish above.


    --------------------------------
    From: Roopashree BR

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>h5rSf3Znf0+mp7vrMnkuGQ==</Id>
     
    Roopashree BR via .NET 247, Apr 26, 2004
    #1
    1. Advertising

  2. <asp:TemplateColumn>
    <ItemTemplate>
    <asp:LinkButton Runat="server" Visible='<%#
    (Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Size")) ==
    2)?true:false%>'>Bla-bla</asp:LinkButton>
    <asp:Label Runat="server" Visible='<%#
    (Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Size")) !=
    2)?true:false%>' ID="Linkbutton1">Bla-bla</asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>

    "Roopashree BR via .NET 247" <> wrote in message
    news:...
    > I have a datagrid which is populated with the values from the database and

    has a column named Description. According to value of Description, the text
    of the Description is to be changed to hyperlink.
    > eg. If its value is XX --- then display hyperlink for this value alone in

    the column
    > Elseif its value is YY --- then display normal label or text.
    >
    > Is there any other way than using Datagrid to accomplish above.
    >
    >
    > --------------------------------
    > From: Roopashree BR
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>h5rSf3Znf0+mp7vrMnkuGQ==</Id>
     
    Michael Tkachev, Apr 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FuZHk=?=

    Display hyperlink in datagrid

    =?Utf-8?B?U2FuZHk=?=, Jun 6, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,405
    =?Utf-8?B?U2FuZHk=?=
    Jun 7, 2005
  2. davetichenor
    Replies:
    1
    Views:
    844
    Eliyahu Goldin
    Oct 30, 2006
  3. Adam Getz

    Dynamic DataGrid Hyperlink column

    Adam Getz, Jul 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    189
    Daniel Bass
    Jul 8, 2003
  4. Dave
    Replies:
    0
    Views:
    957
  5. Sudhir
    Replies:
    0
    Views:
    115
    Sudhir
    Aug 22, 2003
Loading...

Share This Page