I have a gridview(Gvpatientnm) that has another gridview embedded in it (gviewvisitdetailsinfo)
I have a sub that on the selected index changed that open a details view based on the gviewvisitdetailsinfo selected value in a modal pop up window.
I had this working, but it is erractic. I keep getting.
Specified argument was out of the range of valid values.
Parameter name: index
This all happens on selected indexchanged for the gviewvisitdetails grid
here is my code
I have a sub that on the selected index changed that open a details view based on the gviewvisitdetailsinfo selected value in a modal pop up window.
I had this working, but it is erractic. I keep getting.
Specified argument was out of the range of valid values.
Parameter name: index
This all happens on selected indexchanged for the gviewvisitdetails grid
here is my code
Code:
1. Protected Sub gvVisits_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
2. Dim row As GridViewRow
3. For Each row In gvPatientsNM.Rows
4. Dim gvVisit As GridView = CType(row.FindControl("gviewVisitDetailInfo"), GridView)
5.
6.
7.
8. Dim varVisitid = gvVisit.SelectedValue
9. odsVisitsEdit.SelectParameters("VisitID").DefaultValue = varVisitid
10.
11.
12. Next
13.
14. dviewVisitsEdit.DataBind()
15. dviewVisitsEdit.ChangeMode(DetailsViewMode.Edit)
16. ModalpopupVisits.Show()
17. End Sub