I want to use the GridView for a Search screen. The 1st column in the grid will be the ID value for the record. I want to put a Hyperlink column so the user can click on the ID value and have the Silverlight app navigate to another page within the app that allows the user to work with that record.
The parameter passed with the link will be the ID value.
I was able to use this code to access an external link:
<
telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding ID}"
NavigateUrlMemberPaths="TeamUrl"
NavigateUrlFormatString="{} http://www.testapp.com/{0}"
TargetName="_blank" />
However, I couldn't get this to direct me to a page within the current app.
Any ideas?
TIA
D
6 Answers, 1 is accepted
So, where did it redirect you to?
What data does the TeamUrl property holds?
Kind regards,
Veskoni
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.
I'm sorry if I didn't ask my question clearly. In the documentation for the latest version of the Telerik Silverlight controls, it indicates that this should work:
<telerik:GridViewHyperlinkColumn Header="ID" DataMemberBinding="{Binding ID}" TargetName="/TestPage" />
If I use this, it gives me an unhandled error 404. something about the binding cannot be NULL.
What I need is an example of a GridViewHyperlinkColumn that directs me to an internal page within the app.
D
I have attached a sample application here. Please download it and give it a go.
It uses the Silverlight Navigation project template. I added a gridview with dynamic hyperlink column which redirects to another page and show information about the clicked row.
Hope you find it useful.
Best wishes,
Veskoni
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.
D
I have downloaded the sample app which works fine, but when I use the code in my app it opens a new browser window with a suffix added to the URL for the page name - like ordinary HTML navigation - instead of going to the different xaml page.
My code is:
<telerik:RadGridView Name="gridView2" AutoGenerateColumns="False" ItemsSource="{Binding rowCollection, Source={StaticResource DocumentsSampleData}}" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Document_Name}"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Document_Description}"/> <telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding DocumentID}" TargetName="ContentFrame" NavigateUrlMemberPaths="DocumentID" NavigateUrlFormatString="/DocumentContent/{0}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> It is very perplexing becuase your project works and mine dosen't :-)
I checked the code behind and there didn't seem to be anything there that would cause this difference. Maybe it has to do with the project type?
Any assistance would be appreciated.
Thank you,
Edward
From the code snippet provided you have missed to specify the following properties TargetName, NavigateUrlMemberPaths, NavigateUrlFormatString as it was shown in the previous example:
<telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding Email}" TargetName="ContentFrame" NavigateUrlMemberPaths="Email" NavigateUrlFormatString="/DetailsPage/{0}"/>You can read more about these properties following this link.
Kind regards,
Vanya Pavlova
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.