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

gridviewdynamichyperlinkcolumn Encode Url URL

4 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vedant
Top achievements
Rank 1
vedant asked on 02 May 2012, 04:04 PM
How to Encode URL that is set up using NavigateUrlFormatString and NavigateUrlMemberPaths, I have special char in one of the querystring parameter and do not want to go through hassle of using Regex to encode and decode special char from parameter

Rather I prefer to use something like HttpUtility.UrlEncode (which of course didn't work when I place encoding around NavigateUrlFormatString)

Please reply.

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 07 May 2012, 12:44 PM
Hi,

 The GridViewHyperlinkDynamicColumn generates the Uri like so

link.NavigateUri = new Uri(String.Format(NavigateUrlFormatString, values.ToArray()), UriKind.RelativeOrAbsolute);

Where the "values' are the values extracted from the NavigateUrlMemberPaths.

If you need something custom, you can create your custom column and implement the encoding by overriding the CreateCellElement method.  


Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
vedant
Top achievements
Rank 1
answered on 07 May 2012, 09:10 PM
can you post code sample. I do not see NavigateUri property on GridViewDynamicHyperLinkColumn.
0
vedant
Top achievements
Rank 1
answered on 25 May 2012, 02:34 PM
Any Updates on this, I am still trying to encode Url. This is for Silverlight version of the Grid , NavigateUri is not a member of Silverlight version on GridViewDynamicHyperlinkColumn 
0
Dimitrina
Telerik team
answered on 25 May 2012, 03:07 PM
Hi,

 I have attached a sample code on how you can implement your custom column.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
vedant
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
vedant
Top achievements
Rank 1
Share this question
or