I have a datagrid that has a hyperlink in the 1st column that once clicked, it sends them to another page with the individuals SSN being sent over to get information for that page. The only problem is that when i sort the datagrid and then i click on an individuals name, it grabs the row from the original query and not the row that was clicked after the sort command was executed.
heres my code:
Try
Dim a As String = e.CommandName
If e.CommandName = "GoToNonProducerReviewChecklist" Then
Dim ds As DataSet = GetNonProducerReviewList()
Dim r As Integer = CInt(e.Item.ItemIndex)
Session("SSN") = ds.Tables("NonProducerReviewList").Rows(r).Item("SSN")
Dim Script As New System.Text.StringBuilder
With Script
.Append("<script language='javascript'>")
.Append("var newWin = window.open('./StateChecklist.aspx','StateRegistrationRenewal','scrollbars=yes,resize=yes,height=750, width=1000');")
.Append("</script>")
End With
RegisterStartupScript("OpenNewWindow", Script.ToString())
End If
Catch ex As Exception
lblMessage.Text = ex.Message
End Try
how do i get it so that even after a sort command, it grabs the row clicked and not the row that was there at the original state of the page??
any help will be greatly appreciated. thanks AC
heres my code:
Try
Dim a As String = e.CommandName
If e.CommandName = "GoToNonProducerReviewChecklist" Then
Dim ds As DataSet = GetNonProducerReviewList()
Dim r As Integer = CInt(e.Item.ItemIndex)
Session("SSN") = ds.Tables("NonProducerReviewList").Rows(r).Item("SSN")
Dim Script As New System.Text.StringBuilder
With Script
.Append("<script language='javascript'>")
.Append("var newWin = window.open('./StateChecklist.aspx','StateRegistrationRenewal','scrollbars=yes,resize=yes,height=750, width=1000');")
.Append("</script>")
End With
RegisterStartupScript("OpenNewWindow", Script.ToString())
End If
Catch ex As Exception
lblMessage.Text = ex.Message
End Try
how do i get it so that even after a sort command, it grabs the row clicked and not the row that was there at the original state of the page??
any help will be greatly appreciated. thanks AC