I have a form with Search User Button when I select the button the modal popup extender will show and user can search all the employees, when select value, the value selected should pass to the parent form with another gridview.
Now, I have a code which convert dataview to datatable. When debugging the value of index (s) is not passing to (idx).
Dim RowIndex As Integer = gvUser.EditIndex
Dim dt As New DataTable
dt = TryCast(Session("dbCache_User"), DataView).Table.Clone
Dim dv As New DataView(dt, "", "USR_IDNTY", DataViewRowState.OriginalRows)
Dim s As String = TryCast(gvUser.Rows(RowIndex).FindControl("lblUSR_IDNTY"), Label).Text
Dim idx As Integer = dv.Find(s)
dv(idx)("USR_ID") = row.Cells(1).Text
dv(idx)("NAME") = row.Cells(2).Text
gvUser.DataSource = dv
gvUser.DataBind()
When I'm trying to debug. I try to search one row with index 4; the value of (s) is 4 but when passing to (idx) it is -1.
I need to find the value s.