Counting the Items in a dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to do an item count of a datagrid but my problem is that the
datagrid is paged and I only get a count for the number of rows in one page
as oppose to the whole dataset which has been bound to it.

Is there some easy way to count the items in a dataset instead or another
way around this.

Cheers for any help anyone can give me.
 
Stephen

It is not difficult to get an count of all the items in a dataset.

It is the sum of all DataTable[x].Rows.Count * DataTable[x].Columns.Count as
in the dataset.

I hope this helps,

Cor
 
Hi,

In addition to the Cor's answer.
If you have row deletion allowed in DataGrid then
i recommend to count rows by:
dataSet1.Tables[x].DefaultView.Count

Regards
Marcin
 
Back
Top