My code:
Code:
    Sub PopulateGrid()

        Me.gvDocList.Visible = False

        GetDataForGrid(ds)

        If ds.Tables.Count = 0 Then Exit Sub
        If ds.Tables(0).Rows.Count = 0 Then Exit Sub

        Me.gvDocList.Visible = True

        Try

            Me.gvDocList.DataSource = ds

            Me.gvDocList.DataBind()

        Catch ex As Exception
            Response.Write("Exception in PopulateGrid(): " + ex.Message)
        End Try
    End Sub
The exception I am getting:
Exception in PopulateGrid(): There is no row at position 0.

What the debugger says after I get the exception:
? ds.Tables(0).Rows(0).Item(0).ToString
"10304"

Isn't that a row at position zero??? I must be tired...I should've gotten that free iced coffee at DD today