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

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -