Results 1 to 2 of 2

Thread: text in BindingSource displayed Hyperlink?

  1. #1

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    text in BindingSource displayed Hyperlink?

    Hi all

    I was wondering if there was a way from the bindingsouce to have a column formated as a hyperlink but not show the full link

    for example

    Displayed text ="Details"
    URL = www.google.com

    I currently have this code for looping through the BS but I'm just unsure on how to make it click able as a hyper link

    c# Code:
    1. foreach (DataRowView view in myBindingSource)
    2.             {
    3.                 if ((string)view["group_name"] == "USAT-Desktop")
    4.                 {
    5.                     view["group_name"] = "TEST TEST";
    6.                 }
    7.             }

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: text in BindingSource displayed Hyperlink?

    Displaying some text as a clickable link has nothing whatsoever to do with a BindingSource. A BindingSource is a view of a data source that you can bind to controls. How the data is displayed is the domain of the controls themselves. If you're displaying this data in a DataGridView then you neeto add a link column and bind it to that column of your data source, otherwise you need to create individual LinkLabel controls. I'm not sure if the DataGridViewLinkCell class inherently supports displaying a different value to the one it's bound to, but if not then it's a simple matter of inheriting the class and implementing that functionality yourself.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width