Connecting Tech Pros Worldwide Forums | Help | Site Map

Getting row count after setting RowFilter on datatable

Member
 
Join Date: Feb 2009
Posts: 35
#1: May 28 '09
I'm trying to get the filtered row count on my datatable. Is this possible?

I'm doing something like this:

dt.DefaultView.RowFilter = expression;
lbl_count.Text = dt.DefaultView.Table.Rows.Count.ToString();
//binding to a PagedDataSource object goes here... etc etc.

But obviously that doesn't work.

Member
 
Join Date: Feb 2009
Posts: 35
#2: May 28 '09

re: Getting row count after setting RowFilter on datatable


Oops, found the solution: http://bytes.com/groups/net-c/267801...owfilter-issue (from bytes.com)
Reply

Tags
count, filter, row