J
Jon Paal
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:
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