Counting rows

  • Thread starter Thread starter Michael Wong
  • Start date Start date
M

Michael Wong

Hi,

I'm currently using the following code to count non-deleted rows in a
DataTable. Is there another more efficient method?

int count = (int)myDataSet.myDataTable.Computer("Count(columnId)","");

// The following will also count the deleted rows
int count = myDataSet.myDataTable.Count

Thanks
 
I believe the DefaultView of the datatable is set up for only non-deleted
ones, check the count of that.
 

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