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

Problem with Rowfilter of Dataview

Hi everyone,
I'm a n00b on VB.net programming and now I stumbled upon a problem I
can't solve, even after browsing the net for hours..

I have a dataview witg 4 columns; 2 string columns and 2 integer
columns
I want to use the RowFilter to get the 'records' where one of the
integer columns holds a certain integer and use that dataview as
datasource for my listbox
This gives all sorts of error...
I get errors like option strict on disallows implicit
coversion from string to double

Isn't it possible to use integers in a rowfilter?
I can do it otherwise by looping through the dataview and where-ever
the value in the specific column matches my parameter, I can add an
Item to the listbox?
But even here I have a question; Is it possible to add besides a
displaymember also a value that isn't shown but can be called by
"SelectedValue"?

I really hope you guys can help me!!

Here's the code from my dataview and filter

dvaanw2.RowFilter = "activiteitID =
" + paramactid
lstActAanwezigen.DataSource = dvaanw2
lstActAanwezigen.DisplayMember = "LidNaam"
lstActAanwezigen.ValueMember =
"usrID"

ps My Apologies for any mistakes against the english language, but I'm
from Belgium :-)

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #1
3 1749
Comments inline:
--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Catullus" <ca******@telenet-dot-be.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
Hi everyone,
I'm a n00b on VB.net programming and now I stumbled upon a problem I
can't solve, even after browsing the net for hours..

I have a dataview witg 4 columns; 2 string columns and 2 integer
columns
I want to use the RowFilter to get the 'records' where one of the
integer columns holds a certain integer and use that dataview as
datasource for my listbox
This gives all sorts of error...
I get errors like option strict on disallows implicit
coversion from string to double ----

Thats a GOOD sign -
Isn't it possible to use integers in a rowfilter? Yes, it's possible I can do it otherwise by looping through the dataview and where-ever
the value in the specific column matches my parameter, I can add an
Item to the listbox?
But even here I have a question; Is it possible to add besides a
displaymember also a value that isn't shown but can be called by
"SelectedValue"? ---
Don't understand what you mean? You can chnage the rowfilter when
selectedvalue changes, just dump this code sinppet in the SelectedValue
changed handler.
I really hope you guys can help me!!

Here's the code from my dataview and filter

dvaanw2.RowFilter = "activiteitID =
" + paramactid ------ This wont work if paramactid is not a string.

just do "activiteitID = " + paramactid.ToString()
lstActAanwezigen.DataSource = dvaanw2
lstActAanwezigen.DisplayMember = "LidNaam"
lstActAanwezigen.ValueMember =
"usrID"

ps My Apologies for any mistakes against the english language, but I'm
from Belgium :-)

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 21 '05 #2
ok never mind
I'm a real idiot :p

had an error further down that I didn't notice..

for the rowfilter to work apparently you have to cast it to a string
and that works..

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #3
Cattalus,
I'm a real idiot :p

You are from Belgium you said, I will not say that.

(Not Dutch or Begians will not understand this)

And to be serious, you found it yourself, messaged that, and told you where
an Idiot. That shows in my opinon the opposite. Some people are so stuppid
that they won't even commit that they made a mistake and leave the question
open.

So thanks for telling this to us.

:-)

Cor
Nov 21 '05 #4

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

Similar topics

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...
2
by: Ryan Moore | last post by:
I have a dataset (called adset) which has a column called "Large" which is either an integer 0 or 1. I am creating 2 dataviews, one which should display the 1's and one which should display the...
8
by: Dave Hagerich | last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being displayed, using the following code as a test: DataView theView = new DataView(theDataSet.Tables); theView.RowFilter =...
11
by: Geoff Jones | last post by:
Hi I have a table that has a column with Date types. I am trying to view certain rows in the table using a DataView. Using the filter, I can view the rows with, for example, the date equal...
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 ...
3
by: Anup Daware | last post by:
Abstract: I want to filter a dataview with a value where column name have a SPACE. Description:- I bind a dataview to a datagrid, The query which is fetching the results in Dataset is something...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.