data grid question

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

I'm binding a data source to a data grid :

objConnection.Open();
dgHistory.DataSource =
objCommand.ExecuteReader(CommandBehavior.CloseConnection);
dgHistory.DataBind();

The question I have is, if the data source is empty how do I test for
this? I want to print to the screen using a label if there is no data
to be displayed.


Any help would be appreciated.


Cheers,

Mike
 
You can check like this itself.

if isnothing(dghistory.datasource) then
do something
end if
 
Back
Top