HowTo: databound hyperlink in DataGrid?

Discussion in 'ASP .Net' started by Alex, Apr 14, 2004.

  1. Alex

    Alex Guest

    I would like to have one column in my DataGrid that content acts as a
    hyperlink.
    In addition to that I would like that the content is databound to a DataSet
    source.

    If I create a hyperlink column in VS.NET I loose the databinding feature for
    that column. If I choose a data bound column I don't get the hyperlink
    formatting and actions.
     
    Alex, Apr 14, 2004
    #1
    1. Advertising

  2. Right click on the datagrid and go to Property Builder. Go to the second
    choice, which is bound columns (or similar). Uncheck autogenerate checkbox
    and add each of the columns. Unfortunately, you will have to know the actual
    names of the fields. You can set up a hyperlink column by pulling a
    hyperlink column over. You can set different fields for text and URL. For
    URL format, it is generally:

    pageName.aspx?ID={0}

    You then specify the column to use for ID= in the URL text field. Once you
    play with it a bit, you will find it to be extremely simple.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************************************************
    Think outside the box!
    ***************************************************************
    "Alex" <> wrote in message
    news:c5htli$cum$...
    > I would like to have one column in my DataGrid that content acts as a
    > hyperlink.
    > In addition to that I would like that the content is databound to a

    DataSet
    > source.
    >
    > If I create a hyperlink column in VS.NET I loose the databinding feature

    for
    > that column. If I choose a data bound column I don't get the hyperlink
    > formatting and actions.
    >
    >
    >
     
    Cowboy \(Gregory A. Beamer\) [MVP], Apr 14, 2004
    #2
    1. Advertising

  3. Alex

    Alex Guest

    Being new to this, I think I need a little more detail for the second part.
    My URL's come from a DB as a column in the dataset.


    "Cowboy (Gregory A. Beamer) [MVP]" <> wrote
    in message news:O%23%...
    > Right click on the datagrid and go to Property Builder. Go to the second
    > choice, which is bound columns (or similar). Uncheck autogenerate checkbox
    > and add each of the columns. Unfortunately, you will have to know the

    actual
    > names of the fields. You can set up a hyperlink column by pulling a
    > hyperlink column over. You can set different fields for text and URL. For
    > URL format, it is generally:
    >
    > pageName.aspx?ID={0}
    >
    > You then specify the column to use for ID= in the URL text field. Once you
    > play with it a bit, you will find it to be extremely simple.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ***************************************************************
    > Think outside the box!
    > ***************************************************************
    > "Alex" <> wrote in message
    > news:c5htli$cum$...
    > > I would like to have one column in my DataGrid that content acts as a
    > > hyperlink.
    > > In addition to that I would like that the content is databound to a

    > DataSet
    > > source.
    > >
    > > If I create a hyperlink column in VS.NET I loose the databinding feature

    > for
    > > that column. If I choose a data bound column I don't get the hyperlink
    > > formatting and actions.
    > >
    > >
    > >

    >
    >
     
    Alex, Apr 14, 2004
    #3
    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. BobRoyAce
    Replies:
    2
    Views:
    4,552
    BobRoyAce
    Jan 20, 2005
  2. Igor
    Replies:
    0
    Views:
    564
  3. Carlos
    Replies:
    1
    Views:
    8,934
    PeterKellner
    Jun 8, 2006
  4. rodchar
    Replies:
    0
    Views:
    399
    rodchar
    Nov 26, 2007
  5. Manu
    Replies:
    0
    Views:
    178
Loading...

Share This Page