Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Datagrid Hyperlink Column

Author  Topic 

juicyapple
Posting Yak Master

176 Posts

Posted - 2008-06-12 : 21:27:24
Hi, I have created a hyperlink column in datagrid, but how to make one cell can contain more than one hyperlink text??

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-06-12 : 21:29:34
I am not quite sure what you mean by "more than one hyperlink text" (more than one hyperlink? Or a hyperlink with more than one word?) but to do anything other than single hyperlinks you must use a TemplateColumn.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

ayamas
Aged Yak Warrior

552 Posts

Posted - 2008-06-13 : 03:10:28
I think he means that he need to add two hyperlinks in one cell.If this is what you mean then
In datagrid ItemDataBound event you need to use something like this

Dim hpy1 as new hyperlink
Dim hpy2 as new hyperlink
e.Item(your cell index).Controls.Add(hpy1)
e.Item(your cell index).Controls.Add(hpy2)
Go to Top of Page

juicyapple
Posting Yak Master

176 Posts

Posted - 2008-06-16 : 03:49:47
quote:
Originally posted by ayamas

I think he means that he need to add two hyperlinks in one cell.If this is what you mean then
In datagrid ItemDataBound event you need to use something like this

Dim hpy1 as new hyperlink
Dim hpy2 as new hyperlink
e.Item(your cell index).Controls.Add(hpy1)
e.Item(your cell index).Controls.Add(hpy2)



Thanks.
Go to Top of Page
   

- Advertisement -