How tell if formview has no data?

G

Guest

Using code, how can I tell if a formview control has no data/records?

I think there are few ways you can do it, you can check if
Formview.DataItem, or Formview.Row are not null, you can check if
datasource has rows, etc
 
C

Cirene

Can you provide a sample?

This doesn't seem to work:

If me.fv1.Row Is Nothing Then
 
G

Geo

Hi, Why dont you try..
for (int i = 0; i <= [FormviewName].PageCount; i++)
{
//Will come here if there is data.
}
 

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

Members online

No members online now.

Forum statistics

Threads
474,188
Messages
2,571,002
Members
47,591
Latest member
WoodrowBut

Latest Threads

Top