Rows

  • Thread starter Thread starter Steve Schroeder
  • Start date Start date
S

Steve Schroeder

How might I return a current count of rows in a dataset table? I tried the
obvious:

DataSet.Tables("TableName").Rows.Count

However that returns the original number of rows, and not the number of rows
filtered subsequently in my datagrid. How may I return either the number of
filtered roceds in the dataset, or lacking that the number of rows displayed
in my datagrid? Thanks...

Unfortuantely because the documentation is so deeply nested and
multi-rooted, its next to impossible to find anything specific :-S Any help
would be greatly appreciated.
 
Hi Steve,

Try with
DataSet.Tables("TableName").DefaultView.Count as grid is using DataView to
get, filter, sort, ... the data.
 
Worked like a charm...thank you!

Miha Markic said:
Hi Steve,

Try with
DataSet.Tables("TableName").DefaultView.Count as grid is using DataView to
get, filter, sort, ... the data.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

Steve Schroeder said:
How might I return a current count of rows in a dataset table? I tried the
obvious:

DataSet.Tables("TableName").Rows.Count

However that returns the original number of rows, and not the number of
rows
filtered subsequently in my datagrid. How may I return either the number
of
filtered roceds in the dataset, or lacking that the number of rows
displayed
in my datagrid? Thanks...

Unfortuantely because the documentation is so deeply nested and
multi-rooted, its next to impossible to find anything specific :-S Any
help
would be greatly appreciated.
 
Back
Top