Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1285
SelectedRows(0) is returning nothing even though the SelectedRows.Count = 1
posted

So, here's my code (it is housed in a button_click event

 

If grdBidDescriptions.Behaviors.Selection.SelectedRows.Count > 0 Then

Dim qqPhaseID As Integer

            qqPhaseID = grdBidDescriptions.Behaviors.Selection.SelectedRows.Item(0).DataKey.ToString

            Response.Redirect("SavedPhaseDescriptions.aspx?QQPhaseID=" & qqPhaseID)

End If

The error is attached as an image.

 

The funny thing is, I have the exact code in another window with a grid that works perfectly and I have looked for any differences and can't find any between the two grids. Please give me a hint of what I am doing wrong here.