How to count the total no of rows in Accpac ViewList,

Hi 

Is there any function or property to sum the total no of rows in Accpac  viewlist?

  • 0
    I do not believe so. You don't know if the grid has loaded all of the records. I would probably do something like: take a bookmark of the current record, disable the data source events (FireEvents = False), browse/fetch through the records using the data source and calculate your sum, restore the record position using the bookmark and re-enable the events.

    You can also check the header record. Sometimes it contains a field value that holds the number of child records. I'm not sure if it will be updated until you save, however. So it might not be accurate if the user is adding/deleting records.
  • 0 in reply to Django
    Just as a thought: you could use the .FilterCount property to get the number of records that match a search criteria. If you use the same criteria as the viewlist then you get the count of rows - assuming that is what the OP is looking for. Count or Sum?