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

[Solved] Hyperlink column passing parameter

1 Answer 156 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.
Michael Hassinger
Top achievements
Rank 1
Michael Hassinger asked on 27 Sep 2010, 05:11 AM
I have a grid with a hyperlink column that needs to go to another xaml page and pass a parameter so the other page knows which item was clicked on. I am trying to use a querystring parameter without luck so far.

My column looks like:

<datagrid:GridViewDynamicHyperlinkColumn Header="ERR #" DataMemberBinding="{Binding ResourceRequestNo}" NavigateUrlMemberPaths="ScheduleId" NavigateUrlFormatString="/Breakdown?sid={0}" IsReadOnly="True"/>

When I click the link, it looks like: localhost:2261/NavPage.aspx#/Breakdown?sid=6.  Since the parameter is after the #, I am unable to find the value - HtmlPage.Document.QueryString["sid"] ends up being null.

I started the project with the Silverlight Business Application template, and have the following code in my MainPage.xaml:

<navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                  Source="/Projects" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
    <navigation:Frame.UriMapper>
      <uriMapper:UriMapper>
        <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
        <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
      </uriMapper:UriMapper>
    </navigation:Frame.UriMapper>
</navigation:Frame>

How do I use the hyperlink column to pass the value I want to the destination xaml page?

1 Answer, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 27 Sep 2010, 07:47 AM
Hello Michael Hassinger,

Here is a sample project.

Hope you find it useful.

Greetings,
Veselin Vasilev
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
Tags
GridView
Asked by
Michael Hassinger
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or