Master Detail page problem

Discussion in 'ASP .Net' started by Jon Paal, Nov 19, 2005.

  1. Jon Paal

    Jon Paal Guest

    using VWD, Master/detail example page is not working correctly. Selected row from gridview does not display in the detailsview.
    Detailsview always shows the same record, and never changes, regardless of gridview selection.

    How do I pass the SelectedDataKey.Value from the gridview to detailsview in VWD ?

    The selected value from the gridview is correct when displayed by the response.write statement in the code below. The detailsview
    is using the primary key value as the DatakeyNames and I have the following code in the script:

    Code:
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    DetailsView1.PageIndex = GridView1.SelectedDataKey.Value
    Response.Write("<b>SelectedDataKey.Value: </b>" & Server.HtmlEncode(GridView1.SelectedDataKey.Value) & "<br />")
    End Sub
    
    Jon Paal, Nov 19, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Olbert

    Master Page Button and Detail Page Button

    Mark Olbert, Jan 30, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    620
    Mark Olbert
    Feb 3, 2006
  2. asmj
    Replies:
    0
    Views:
    499
  3. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    194
    Arun Kumar Menon
    Aug 6, 2003
  4. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    354
    Frederik Borg
    Jun 9, 2006
  5. Raphael Gluck

    master/detail page problem

    Raphael Gluck, Oct 21, 2003, in forum: ASP General
    Replies:
    8
    Views:
    187
    Adrienne
    Oct 22, 2003
Loading...

Share This Page