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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top