Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 To: peter de groot
  Where is peter de groot?
 Heerhugowaard
 Netherlands
 peter de groot
 Tags
Subject: RE: Gridrows
Thread ID: 461 Message ID: 463 # Views: 6 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, May 31, 2001 1:48:24 AM         
   


> Hello all,
>
> I'm looking for a way to determine if there is data or if there are rows in a grid.
>
>
> TIA
>
> Peter

Too bad that VFP grids dont not have a rowcount property, however:

lnRowCount = RECCOUNT(thisfrom.grid1.recordsource)

Note that this includes deleted records, even if you have SET DELETED ON (use COUNT TO or SELECT SQL INTO foo and retrieve the _tally if you can't use RECCOUNT() because of this) and that you must always test if the recordsource exists:

IF USED(thisfrom.grid1.recordsource)
lnRowCount = RECCOUNT(thisfrom.grid1.recordsource)
ENDIF

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

ENTIRE THREAD

Gridrows Posted by peter de groot @ 5/31/2001 12:52:10 AM
RE: Gridrows Posted by Eric den Doop @ 5/31/2001 1:48:24 AM