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

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -