This is a migrated thread and some comments may be shown as answers.

GridHyperLinkColumn url

6 Answers 224 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Severson
Top achievements
Rank 1
Paul Severson asked on 22 Jan 2010, 02:46 PM

I am using a hyperlink column in a RadGrid.  The grid is bound via ClientBinding - binding is working fine.   Column is defined as follows:

 

<

 

telerik:GridHyperLinkColumn UniqueName="MLSNUMBER" HeaderText="Mls Number" DataNavigateUrlFields="DetailsUrl" DataTextField="MlsNumber" Target="_blank" DataNavigateUrlFormatString="{0}"></telerik:GridHyperLinkColumn>

 



The "DetailsUrl" field from the data source holds the complete target url as follows:
http://MyDomainName/ASP/RenderDetail.asp?printable=yes&PropertyID=8EFC370EC45847

When the hyperlink is clicked in the grid,  I get the following incorrect url:

http://localhost/website/http://webtest.realcomponline.com/ASP/RenderDetail.asp?printable=yes&PropertyID=8EFC370EC45847

Apparently my local root web server url is being prepended to the url coming from the datasource.

How can I stop this from happening?

Thx
seevo

6 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 28 Jan 2010, 08:52 AM
Hi Paul,

Based on the supplied information, it is hard to determine what is causing the unwanted behavior. It will be helpful if you could send us a simple project that contains the Grid declaration and code behind. You could open a formal support ticket from your Telerik account and attach a ZIP file there. We will check it and do our best to help.

Best wishes,
Radoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
vishal
Top achievements
Rank 1
answered on 15 Apr 2010, 08:17 AM
I'm facing a similar issue.

Here's the GridHyperlinkColumn I am using :

 

<telerik:GridHyperLinkColumn UniqueName="sName" HeaderText="Leverand&#248;r" DataNavigateUrlFields="sURL" DataNavigateUrlFormatString = "{0} " Target="_blank" DataTextField="sName">

 

 

<HeaderStyle Width="200px" />

 

 

</telerik:GridHyperLinkColumn>

 



where 'sURL' is the field comming from DB that has URL strings stored and which i want to open on click of 'sName'.

when i click the link instead of opening ' www.miltronic.no ' it opens ' http://localhost:1780/dnn_efobasen/DesktopModules/Vivendi.EFO/www.miltronic.no ' . What am i missing?

Thanks,
Vishal.
0
Radoslav
Telerik team
answered on 20 Apr 2010, 12:41 PM
Hello Vishal,

It is hard to say what is causing this problem without seeing the running application and debug it. At this point order to progress in the resolution of this matter I will ask you to send us a simple runnable application demonstrating the problem. Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

Sincerely yours,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
dhuss
Top achievements
Rank 1
answered on 07 Jun 2011, 11:00 PM
Telerik,
How about publishing your findings on this issue. I am having the same problem, but your solution may fix my problem as well without me having to create a demo project to send to you.
0
Radoslav
Telerik team
answered on 10 Jun 2011, 07:47 AM
Hello Dennis,

Unfortunately we still could not reproduce the described issue. Could you please post your aspx markup code with the related code behind. Thus we will be able to gather more details about your scenario and to provide you a solution.

Looking forward for your reply.

Greetings,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
dhuss
Top achievements
Rank 1
answered on 10 Jun 2011, 02:51 PM
I ended up prepending "http://" to the url that is in the datatable. This ended up working just fine. Not sure why I didn't end up like Paul with localhost getting prepended again. But if it works, it works. I am using:
 
telerik.web.ui version 2010.3.1317.35
vs 2008 sp1

This is my aspx code:
<telerik:GridHyperLinkColumn DataNavigateUrlFields="Policy.Link" Text="Policy Link"
    HeaderText="URL" UniqueName="PolicyLink" DataTextFormatString="Policy Link" DataTextField="Policy.Link"
    Target="_blank">
</telerik:GridHyperLinkColumn>

This is my vb.net code:
For Each item As String In aryVerifyErrCols
    If dtResp.Columns.Contains(item) Then
       If item = "Policy.Link" Then
           If Not String.IsNullOrEmpty(drErr(item).ToString.Trim) Then
               drNewErr(item) = "http://" & drErr(item).ToString
           End If
       Else
           drNewErr(item) = drErr(item).ToString
       End If
    End If
Next
Tags
Grid
Asked by
Paul Severson
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
vishal
Top achievements
Rank 1
dhuss
Top achievements
Rank 1
Share this question
or