GridView ItemClick navigate to another page and show details about the clicked item Windows store app RRS feed

  • Question

  • Hi, i have a GridView with item from a list of person list, how can i show details of the clicked item in the next page?

    in the main page i have used this code

    Private Sub itemGridView_ItemClick(sender As Object, e As ItemClickEventArgs) Handles itemGridView.ItemClick
            Me.Frame.Navigate(GetType(BlankPage1), e.ClickedItem)
        End Sub

    and i have used this in the next page

    Private Sub NavigationHelper_LoadState(sender As Object, e As Common.LoadStateEventArgs)
            Dim n As Person = TryCast(e.NavigationParameter, Person)
            txt.Text = n.Name
        End Sub

    Sunday, January 25, 2015 3:55 AM


  • Hi Jay_P85,

    Any question for your code?

    Looks like the code is correct, pass the e.ClickItem to next page and get the Person object by TryCast().

    However I would suggest you simply pass the person id to the next page and query for the id in your person collection, a great sample you can found is Grid App Template while we create the project by Visual Studio template.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Jay_P85 Thursday, January 29, 2015 4:17 AM
    Monday, January 26, 2015 7:57 AM