473,840 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with Dataview Rowfilter

Hi,

It appears that the rowfilter is not working correctly in the following
situation:
This is from my immediate window:

?ChkandBaseMeas View(6)("LowSam pleCheck")
True {Boolean}
[Boolean]: True {Boolean}
ChkandBaseMeasV iew.RowFilter = "LowSampleC heck = True"
?ChkandBaseMeas View.count
0

The last line should read 1. Strangely the "same" code works fine on it's
neighbour column "Checked", which was defined in the same manner:

With dt.Columns
..Add("Checked" , System.Type.Get Type("System.Bo olean"))
..Add("LowSampl eCheck", System.Type.Get Type("System.Bo olean"))
End With

what should I be looking for?

regards,

Richard

P.S. this is winforms 2003
Nov 21 '05 #1
7 1465
Richard,

The first thing I would look for is if the value is maybe dbvalue.null

I hope this helps?

Cor
Nov 21 '05 #2
Cor,

What exactly do you mean by this?

The code from the immediate window shows that the value for one of the rows
is set to true.

?ChkandBaseMeas View(6)("LowSam pleCheck")
True {Boolean}

Fyi all the other rows are dbull.value for that column.

regards,

Richard
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:uo******** ******@tk2msftn gp13.phx.gbl...
Richard,

The first thing I would look for is if the value is maybe dbvalue.null

I hope this helps?

Cor

Nov 21 '05 #3
Richard,

Did you look with the quickview what is in the dataview object direct after
the command from the rowfilter?

Cor
Nov 21 '05 #4
I get this from the immediate window (what is quickview?)

AllowDelete: True
AllowEdit: True
AllowNew: True
ApplyDefaultSor t: False
Container: Nothing
Count: 0
DataViewManager : Nothing
DesignMode: False
Item: <cannot view indexed property>
RowFilter: "LowSampleC heck = True"
RowStateFilter: CurrentRows
Site: Nothing
Sort: ""
Table: {System.Data.Da taTable}

regards,

Richard
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:u6******** ******@TK2MSFTN GP14.phx.gbl...
Richard,

Did you look with the quickview what is in the dataview object direct after the command from the rowfilter?

Cor

Nov 21 '05 #5
Richard,

You show a lot of results, maybe a piece of code can give a better idea?
You wrote yourself

A = 1
B = 1
C = 1

Than
A + B should be the same as B + C

Therefore there should be a reason, however with not even this information
it is hard to help you.

Cor
Nov 21 '05 #6
Richard,

Check your data carefully - your code looks ok.

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com

"Richard Bond" <ri**@nospam.no spam> wrote in message
news:56******** *************** ***********@mic rosoft.com...
Hi,

It appears that the rowfilter is not working correctly in the following
situation:
This is from my immediate window:

?ChkandBaseMeas View(6)("LowSam pleCheck")
True {Boolean}
[Boolean]: True {Boolean}
ChkandBaseMeasV iew.RowFilter = "LowSampleC heck = True"
?ChkandBaseMeas View.count
0

The last line should read 1. Strangely the "same" code works fine on it's
neighbour column "Checked", which was defined in the same manner:

With dt.Columns
.Add("Checked", System.Type.Get Type("System.Bo olean"))
.Add("LowSample Check", System.Type.Get Type("System.Bo olean"))
End With

what should I be looking for?

regards,

Richard

P.S. this is winforms 2003

Nov 21 '05 #7
Thanks for the help, you're right I didn't give you enough code, The problem
has gone now after trying to rewrite it 11 different ways, maybe because I'm
manipulating a new dataview now rather than the default view of the
Datatable?

sorry for the trouble

Rich
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:OZ******** ******@TK2MSFTN GP12.phx.gbl...
Richard,

You show a lot of results, maybe a piece of code can give a better idea?
You wrote yourself

A = 1
B = 1
C = 1

Than
A + B should be the same as B + C

Therefore there should be a reason, however with not even this information
it is hard to help you.

Cor

Nov 21 '05 #8

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

Similar topics

2
5990
by: vbnetrookie | last post by:
In the dataview rowfilter property, how can I say that I just want Titles that start with 'A' to 'J' ?? ex: dv.rowfilter = " Country = ' France ' " I want dv.rowfilter = " Title = (from 'A' to 'J') "
2
3967
by: Top Gun | last post by:
I am trying to code for a compound conditional in the DataView.RowFilter but don't quite no how to do the correct syntax for this. The following code sample chokes on dv.RowFilter: int batchid = 123456; int segment = 3; DataView dv = new DataView(ds.taxBatch); dv.RowFilter = "BatchID = " + batchid + " && Segment = " + segment;
5
15823
by: Jim Heimer | last post by:
When I use the dataview.rowfilter and I try to display the field value of the first row, the code doesn't seem to show the first row AFTER the rowfilter. This is my code: DataView DataView_Filter = new DataView(); DataView_Filter.Table = DS_States.Tables; sFilter = "Emplcode = '123233'"; DataView_Filter.RowFilter = sFilter; MessageBox.Show (DataView_Filter.Count.ToString()); //it displays 6
8
4787
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 dv.RowFilter = "MTX <> 'Actual vs. Forcast'"
4
6051
by: Georg Schmelzer | last post by:
Hi Ng, need some help here. What's wrong with that dataview.rowfilter expression: dtFliste.DefaultView.RowFilter = "Field1 Like '%" & strFV & "%'" & _ " AND Field2 Like '%" & strFS & "%'" & _ " AND Field3 Like '%" & strFT & "%'" & _ " AND Field4 Like '%" & strGW & "%'" & _ " AND Field5 Like '%" & strKu & "%'" & _
7
5633
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 with databinding. The data from the 2 detail tables are displayed in 2 datagridviews. I filter each datagridview with a Dataview object using the dataview.Rowfilter property. This is sort of working except that I am getting an except on one of my...
0
1533
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 using rowfilter with like operator Its working fine when data type of searching column is "string" . But if data type is "integer , datetime or boolean" its throws
2
18944
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 using rowfilter with like operator Its working fine when data type of searching column is "string" . But if data type is "integer , datetime or boolean" its throws
1
2716
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 global dataview is created -The user enters new part information into a form. -A function is called to check to see if the part is a new part (so that two identical part numbers are not added to the database. -The check is done by setting the...
5
11847
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 global dataview is created -The user enters new part information into a form. -A function is called to check to see if the part is a new part (so that two identical part numbers are not added to the database. -The check is done by setting the...
0
9856
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10598
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9436
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7022
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4071
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.