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:
foreach (DataRowView view in myBindingSource)
{
if ((string)view["group_name"] == "USAT-Desktop")
{
view["group_name"] = "TEST TEST";
}
}
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.