473,396 Members | 1,875 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,396 software developers and data experts.

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 18483
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.