programatically controlling the datagrid

Discussion in 'ASP .Net Datagrid Control' started by timcyberbanjo, May 25, 2005.

  1. Hi, I am new to using datagrids.
    I am currently developing a webform where I can load and display data
    using the OdbcConnection. (the data comes from Oracle RDB)
    The data loads and displays fine, however, I want to be able to make a
    hyperlink as an "additional" column to the datagrid that would allow
    the user to link to a more detailed page.

    I really would like to do this programatically, rather than using some
    form of wizard, which is where I seem to keep getting led.

    I will need to dynamically develop the hyperlink code, so it makes
    sense that I add the "link" column in code.

    Could someone out there point me in the right direction?

    Many thanks in anticipation of a response.
    timcyberbanjo, May 25, 2005
    1. Advertisements

  2. Hi timcyberbanjo,

    Thanks for your post!!

    Based on my understanding, you want to add a hyperlink column to your
    webform DataGrid, so that you can click the hyperlink and navigate to the
    details page. If I misunderstand you, please feel free to tell me. Thanks

    Yes, WebForm DataGrid is a Column-based DataBinding server control, which
    we can add a lot of different columns in the DataGrid freely. Normally, we
    can embeded any server child control in the DataGridColumn and make a
    customized column for DataGrid. However, has several
    build-in customized DataGridColumn for our usage, and HyperLinkColumn is
    just one of these build-in columns. For details about how to use
    HyperLinkColumn and how to add it into DataGrid, please refer to:
    "Adding Hyperlink Columns to a DataGrid Web Server Control"
    "HyperLinkColumn Class"

    Generally, we can do the databinding with HyperLinkColumn using
    "DataTextField" and "DataNavigateUrlField" properties of HyperLinkColumn.
    Additionally, we may use "DataTextFormatString" and
    "DataNavigateUrlFormatString" 2 properties for the formatting.

    At last, the article below gives us a more deeply description about columns
    usage in DataGrid, for your information:
    "Creating Custom Columns for the ASP.NET Datagrid"
    Thank you for your patience and cooperation. If you have any questions or
    concerns, please feel free to post it in the group. I am standing by to be
    of assistance.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! -
    This posting is provided "as is" with no warranties and confers no rights.
    Jeffrey Tan[MSFT], May 25, 2005
    1. Advertisements

  3. Hi timcyberbanjo,

    Does my reply make sense to you? Is your problem resolved? If you have any
    concern, please feel free to tell me, thanks

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! -
    This posting is provided "as is" with no warranties and confers no rights.
    Jeffrey Tan[MSFT], May 27, 2005
    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. JoNa SuperGold

    controlling button in headertemplate datagrid

    JoNa SuperGold, Apr 5, 2005, in forum: ASP .Net
  2. Neil
    Nov 16, 2005
  3. Replies:
    Sep 12, 2006
  4. shotokan99

    controlling wmp playlist programatically

    shotokan99, Sep 7, 2007, in forum: Javascript
    Thomas 'PointedEars' Lahn
    Sep 7, 2007
  5. shotokan99

    help in controlling wmp programatically

    shotokan99, Sep 8, 2007, in forum: Javascript
    Sep 8, 2007

Share This Page