473,399 Members | 2,146 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,399 software developers and data experts.

problem with Dataview Rowfilter

Hi,

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

?ChkandBaseMeasView(6)("LowSampleCheck")
True {Boolean}
[Boolean]: True {Boolean}
ChkandBaseMeasView.RowFilter = "LowSampleCheck = True"
?ChkandBaseMeasView.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.GetType("System.Boolean"))
..Add("LowSampleCheck", System.Type.GetType("System.Boolean"))
End With

what should I be looking for?

regards,

Richard

P.S. this is winforms 2003
Nov 21 '05 #1
7 1436
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.

?ChkandBaseMeasView(6)("LowSampleCheck")
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**************@tk2msftngp13.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
ApplyDefaultSort: False
Container: Nothing
Count: 0
DataViewManager: Nothing
DesignMode: False
Item: <cannot view indexed property>
RowFilter: "LowSampleCheck = True"
RowStateFilter: CurrentRows
Site: Nothing
Sort: ""
Table: {System.Data.DataTable}

regards,

Richard
"Cor Ligthert" <no************@planet.nl> wrote in message
news:u6**************@TK2MSFTNGP14.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.nospam> wrote in message
news:56**********************************@microsof t.com...
Hi,

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

?ChkandBaseMeasView(6)("LowSampleCheck")
True {Boolean}
[Boolean]: True {Boolean}
ChkandBaseMeasView.RowFilter = "LowSampleCheck = True"
?ChkandBaseMeasView.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.GetType("System.Boolean"))
.Add("LowSampleCheck", System.Type.GetType("System.Boolean"))
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**************@TK2MSFTNGP12.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
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...
2
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...
5
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...
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 ...
4
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 & "%'" &...
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...
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
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
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
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.