Empty GridView....

Topics: Developer Forum
Apr 4, 2007 at 6:00 PM
When the frozen header gridview is empty, the frozen gridview is not working, the page is blowing out. how can i fix this?

thanks in advance,

Murthy here
Sep 11, 2007 at 9:04 PM
I know this is an older post, but may be this will help someone else or someone will show me a better way. But if my dataset has no rows I run down this path of logic:

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

If ds.Tables(0).Columns.Count = 0 Then
End If

Dim dr As DataRow
dr = ds.Tables(0).NewRow()

dr.Item("Col001") = " -- "
dr.Item("Col002") = " -- "
dr.Item("Col003") = System.DBNull.Value


Return ds

End If