Hyperlink Column

Discussion in 'ASP .Net Datagrid Control' started by Bishoy George, Jan 3, 2006.

  1. I have 2 columns in a Table in SQL database called LinkName , LinkURL.
    I put the 2 columns in a table in a dataset

    How to display the 2 columns in a datagrid as ONE column displaying the
    LinkName column and when the user clicks on the link name item it directs
    the user to its link url.

    Thanks.
     
    Bishoy George, Jan 3, 2006
    #1
    1. Advertisements

  2. Bishoy George

    Ahmed Fouad Guest

    <asp:DataGrid id="MyDataGrid"
    BorderColor="black"
    BorderWidth="1"
    GridLines="Both"
    AutoGenerateColumns="false"
    runat="server">

    <HeaderStyle BackColor="#aaaadd"/>

    <Columns>

    <asp:HyperLinkColumn
    HeaderText="Click an Item"
    DataTextField="LinkName"
    DataNavigateUrlField="LinkUrl" />

    </Columns>

    </asp:DataGrid>


    "Bishoy George" <> wrote in message
    news:...
    >I have 2 columns in a Table in SQL database called LinkName , LinkURL.
    > I put the 2 columns in a table in a dataset
    >
    > How to display the 2 columns in a datagrid as ONE column displaying the
    > LinkName column and when the user clicks on the link name item it directs
    > the user to its link url.
    >
    > Thanks.
    >
     
    Ahmed Fouad, Jan 3, 2006
    #2
    1. Advertisements

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. Claire Reed

    change datagrid column to hyperlink

    Claire Reed, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    547
    Marina
    Aug 4, 2003
  2. Child
    Replies:
    1
    Views:
    448
    Child
    Aug 11, 2003
  3. =?Utf-8?B?V2FyYW4=?=

    HyperLink Column and Button Column in a DataGrid

    =?Utf-8?B?V2FyYW4=?=, Aug 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    764
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  4. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,214
    deandany
    Jul 17, 2006
  5. davetichenor
    Replies:
    1
    Views:
    1,109
    Eliyahu Goldin
    Oct 30, 2006
  6. Keith G Hicks
    Replies:
    3
    Views:
    1,008
    Keith G Hicks
    Feb 18, 2008
  7. Ken
    Replies:
    1
    Views:
    682
    Alvin Bruney
    Aug 16, 2003
  8. Dave
    Replies:
    0
    Views:
    1,242
Loading...