473,467 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataView.RowFilter issue


Hello,
I use The RowFilter property to select number of row from my dataview.

How can i get the number of rows found ?

I experience that the number of rows remains the same as before the filter
was applyied if there i no match for the filter.

Any comment will be highly appreciated.

JB
Nov 17 '05 #1
2 18488
Jensen,

The dataview (or defaultview) is a filter. The rows in the tables stays the
same.

dv.Count
or
MyTable.DefaultView.Count

Gives you the number of records which are filtered out to use.

I hope this helps,

Cor
Nov 17 '05 #2
JB,
The DataView.Count property should change based on the RowFilter property.

http://msdn.microsoft.com/library/de...counttopic.asp

As Cor suggests the DataTable.Rows.Count property will remain the same...

DataTable table = ...

DataView view = new DataView(table);
Debug.WriteLine(view.Count, "view before");
Debug.WriteLine(table.Rows.Count, "table before");
view.RowFilter = "text = 'pmts'";
Debug.WriteLine(view.Count, "view after");
Debug.WriteLine(table.Rows.Count, "table after");
Hope this helps
Jay

"Jensen bredal" <je************@yahoo.com> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...
|
| Hello,
| I use The RowFilter property to select number of row from my dataview.
|
| How can i get the number of rows found ?
|
| I experience that the number of rows remains the same as before the
filter
| was applyied if there i no match for the filter.
|
| Any comment will be highly appreciated.
|
| JB
|
|
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LaoJ | last post by:
I defined three Dataviews for the same table to get different rows: They are : dvFather, dvMother and dvOther set Filter as follow: dvFather.Rowfilter="relationship = 'father' "...
2
by: Jensen bredal | last post by:
Hello, I use The RowFilter property to select number of row from my dataview. How can i get the number of rows found ? I experience that the number of rows remains the same as before the...
8
by: KC | last post by:
For a DataView.Rowfilter can I use more than one expression? I want to filter out two different things. For example can I take: dv.RowFilter = "MTX <> 'Customer Forcast'" and ...
7
by: Rich | last post by:
Hello, I am pulling master data from one master table and detail data from two detail tables. The rows from the master data are displayed in textboxes on my form which are bound to the data...
3
by: randy1200 | last post by:
I have a DataView (dv) that includes a StartDate DateTime column. I'd like to return the DataView record that contains a StartDate value closest to my IncidentDate value: string filter =...
0
by: neeraj | last post by:
Hi, all Could anny one give me help how can I use like operator with these data types "integer , datetime or boolean" in DataView.RowFilter Actually when I try to get the data from dataview...
2
by: neeraj | last post by:
Hi, all Could anny one give me help how can I use like operator with these data types "integer , datetime or boolean" in DataView.RowFilter Actually when I try to get the data from dataview...
1
by: AlexW | last post by:
Hi I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property. Basically what happens is this: -a...
5
by: AlexW | last post by:
Hi I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property. Basically what happens is this: -a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.