Hello,
I'm new to this so bear with me if this question has been asked and answered before. I tried doing some searches but couldn't find anything that helped.
I have an UltraWebGrid control that is bound to a datasource. On the page I also have a text box for entering search criteria and a search button. When the page initially opens it shows all rows from database. The text box and button are used to filter what is shown in the grid.
What I'm stuck on is how to make the values of one of the columns show up as hyperlinks instead of just the value. Actually, I've been able to make it show up as a hyperlink but now I'm stuck on how to customize that link.
Let's say the grid has 3 visible columns and one hidden. The hidden one is a GUID of the company represented by that row. The visible columns are company code, company name and company address.
I want the company code column to show the code but as a hyperlink. When clicking on it, I want it to go to a detail page that will show all the info about that company. So the hyperlink should look something like <a href=.../dtlPage.aspx?id=ggg>CCC</a> where xxx is the guid of that row and CCC is the company code of that row.
I've made the value a hyperlink by going into the Columns Collection Editor, selecting the code column and changing the Behavior | Type option to HyperLink.
But all that does is turn the value into a hyperlink. How do I customize the link so it looks as shown above?
Thanks in advance for any help!
Thanks for your response. I found a way to do it but I'm not happy with it because it's a bit convoluted. I'd like to try your suggestion but first I must ask another really basic question:
Where does the "OnClientClick..." code go? Could you point me to an example?
Thanks again for your reply and any other help
Use the below mathod to pass the GUID to a javascript and from there call the URL
'OnClientClick='<%# " javascript : openComments(" + (DataBinder.Eval(Container.DataItem, "GUID")) + ",this)" %>' />'
Vini
Do I have this posted in the right forum? As I mentioned, I'm fairly new to this so please let me know if I should post it somewhere else.
I know nobody owes me an answer and that everyone on here is doing this on their own time. I just noticed that a lot of posts seem to get replies quickly so I thought either I have a question that has stumped everyone or I've posted it in the wrong place.
Any help would be greatly appreciated.
David