problem with Dataview Rowfilter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Richard,

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

I hope this helps?

Cor
 
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
 
Richard,

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

Cor
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top