Home All Groups Group Topic Archive Search About
Author
5 Jan 2006 10:27 AM
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

Author
5 Jan 2006 1:49 PM
Marina
I believe the  DefaultView of the datatable is set up for only non-deleted
ones, check the count of that.

Show quote
"Michael Wong" <nospam@email.here> wrote in message
news:uENK2KeEGHA.140@TK2MSFTNGP12.phx.gbl...
> 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

AddThis Social Bookmark Button