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

[Solved] "navigate to" column

1 Answer 83 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.
Edward
Top achievements
Rank 1
Edward asked on 15 Feb 2011, 05:40 AM
Hi,

I have tried the to create a column in a RadGridView (silverlight) where you can click on a row to navigate to the details screen for that row as follows:

<telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding myDataField}"
TargetName="ContentFrame"
NavigateUrlMemberPaths="myDataField"
NavigateUrlFormatString="/Details_Screen/{0}"/>

When I click the column, a new IE window pops up with URL: http://localhost:54462/Details_Screen/ and an error message:

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404.

What am I doing wrong? I don't want a new IE window and there seems to be something incorrect with the navigation becuase as this is silverlight the URL should not change.

TIA

ec :-)

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 16 Feb 2011, 08:14 PM
Hello Edward,

 As discussed in this StackOverflow thread, HyperlinkButton will always assume that the address in the NavigateUri property is outside the application, relative to the application's web path.

What you can do is add a handler for the HyperlinkButton.Click routed event to your RadGridView and call NavigationService.Navigate() using the content of the button's NavigateUri property from within the event handler.

All the best,
Yavor Georgiev
the Telerik team
Tags
GridView
Asked by
Edward
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or