Hi,
I having issue on get value from previous page nested gridview. My codes successfully go to next page once selectedIndexChanged the nested gridview but it's brought wrong data which from first row.
Sample :
Page A : Nested Gridview
May 2016 (Parent Gridview)
2016-05-08 (child Gridview) --- row value
May 2017 (Parent Gridview)
2017-05-08 (Child Gridview) --- row value
--------------------------------------
Page B : Textboxes form
--------------------------------------
My code as below :
If Me.Page.PreviousPage IsNot Nothing Then
Dim rowIndex As String = Request.QueryString("RowIndex")
Dim gvParentGrid As GridView = DirectCast(Me.Page.PreviousPage.FindControl("gvParentGrid"), GridView)
Dim gvChildGrid As GridView = TryCast(gvParentGrid.Rows(gvParentGrid.SelectedValue).FindControl("gvChildGrid"), GridView)
Dim row As GridViewRow = DirectCast(gvChildGrid.NamingContainer, GridViewRow)
For Each row In gvChildGrid.Rows
txtRegDate.Text = row.Cells(1).Text
Next
End If
Once click page A May 2017 Child gridview row, it's brought May, 2016 Child gridview value to Page B. Please guide me how to bring relevant data from the previous page nested gridview. Thanks in advanced