Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of rows in a grid
Message
From
03/06/2004 13:36:56
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00909622
Message ID:
00909638
Views:
14
I suggest you consider changing from set relation etc. to parameterized views or even SPT. Pulling the data for the line items will be slightly longer than the suggested approach of counting the lines using a COUNT FOR.

Once you've done that, you can still count for not deleted(), but that count would be much faster since it would be counting the rows in the view, not the rows in the table.

If the user can't delete, then RECCOUNT() tells you the number of line items.


>Hi,
>
>I have an invoice form with a grid showing the items for that invoice. I would like to do a check before saving the invoice to make sure at least one invoice item exists. I use set relation to link the invoice and invoiceitem table.
>
>My question is how do i find out the number of rows in a grid? There seems to be no grid.rowcount property. The grid is databounded but only a subset of the records in the invoiceitem table is shown (for that invoice).
>
>Thanks,
>David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform