ASP.NET [How to check if SqlDataSource1 is empty] -


I am creating SqlDataSource1.DataBind ();

So I'm working on the gatebound ();

But if my SqlDataSource1 returns empty data then I get an error, even if I'm trying to 'check that if (GridView2.HeaderRow.Cells.Count! = 0) then I think That i have to check it on rough at SqlDataSource1 Question: How?

Thanks

GridView2.HeaderRow is zero when the data source is zero You can check that GridView2.HeaderRow = null


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -