473,408 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Getting row count after setting RowFilter on datatable

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.
May 28 '09 #1
1 21978
Oops, found the solution: http://bytes.com/groups/net-c/267801...owfilter-issue (from bytes.com)
May 28 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
2
by: Alex | last post by:
Hi all, I'm running into a road block, and I know I've done this before. I'm getting fields from two tables, and I need to do a count of similar items with it showing some extra info. Here's...
0
by: Brent | last post by:
In the usual case, this SQL select count(*) from mytable where ... returns an accurate count of the rows you want. But how do I go about counting rows from this SQL (the sum...if statements...
7
by: Jeff Pritchard | last post by:
I need to get a count only of the number of users currently connected to a back-end mdb when a front-end is opened. This is for 2000 onwards. Preferably without requiring any special references...
1
by: tgif | last post by:
I'm trying to set a filter on a table in a DataView to a multi-table DataSet and am guessing it is something like this: dvMyView.RowFilter = "AgencyID = " txtAgencyID.Text; Can someone help me...
1
by: laredotornado | last post by:
Hello, Does anyone have a cross-browser (IE, Firefox, Safari) way of getting the vertical (y) scroll position and also setting it? I would prefer to use JS to do this as opposed to anchors. ...
2
by: paulmac106 | last post by:
Hi, I have 2 tables: tblStatements and tblLines (one to many) Any tblStatements record can have many associated records in tblLines. The search criteria is against tblLines (ie...
4
by: Vlad Dogaru | last post by:
Hello, I am trying to use cookies and Python to create a simple login example. But I am very disoriented at the existence of two cookie libraries, namely Cookie and cookielib. I have seen...
41
by: Jim | last post by:
Hi guys, I have an object which represents an "item" in a CMS "component" where an "item" in the most basic form just a field, and a "component" is effectively a table. "item" objects can be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.