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

data bound listbox + data table select command

I have a data set full of data, and a list box, I want to be able to filter
that set of data to a specific clase then put the returned filtred data into
the list box... how would i do this? I already tried a few ways but haven't
found one that doesn't cause an exception yet... thanks!
Nov 20 '05 #1
3 1220
Cor
Hi Brian,
I have a data set full of data, and a list box, I want to be able to filter that set of data to a specific clase then put the returned filtred data into the list box... how would i do this? I already tried a few ways but haven't found one that doesn't cause an exception yet... thanks!


Why not the the dataview rowfilter
\\\
dim ds as newdataview(mydatatable)
dv.rowfilter = "mycolomn = 'Mytext'"
mylistbox.datasource = dv
mylistbox.displaymember = "mycolomn"
mylistbox.valuemember = "myothercolomn"
///
I am curious why you do not want to use this by the framework supported
class.

Cor
Nov 20 '05 #2
One easy way is binding it to a dataview and setting the rowfilter to filter
out everything you don't want. As soon as the rowfilter is set, the
underlying data will change too.
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:#E**************@TK2MSFTNGP10.phx.gbl...
I have a data set full of data, and a list box, I want to be able to filter that set of data to a specific clase then put the returned filtred data into the list box... how would i do this? I already tried a few ways but haven't found one that doesn't cause an exception yet... thanks!

Nov 20 '05 #3
because i didn't know about it :)
"Cor" <no*@non.com> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl...
Hi Brian,
I have a data set full of data, and a list box, I want to be able to

filter
that set of data to a specific clase then put the returned filtred data

into
the list box... how would i do this? I already tried a few ways but

haven't
found one that doesn't cause an exception yet... thanks!


Why not the the dataview rowfilter
\\\
dim ds as newdataview(mydatatable)
dv.rowfilter = "mycolomn = 'Mytext'"
mylistbox.datasource = dv
mylistbox.displaymember = "mycolomn"
mylistbox.valuemember = "myothercolomn"
///
I am curious why you do not want to use this by the framework supported
class.

Cor

Nov 20 '05 #4

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

Similar topics

9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
1
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary...
3
by: David L Wright II | last post by:
I have a data bound listbox that I want to select multiple lines then process each line. I bound a two column datatable to the listbox and set the DisplayMember property to the appropriate column...
2
by: Rob Richardson | last post by:
Greetings! I am struggling to understand data binding in VB.Net, and it's slow going. I have a list box bound to a dataset that is filled from a SQL Server table. In addition to the list...
2
by: Michael C | last post by:
Hi all, I have a listbox bound to a table in a database and a grid control bound to another related table in the same database. When I select an item in the listbox (in this case a name), the...
3
by: Jay Ruyle | last post by:
I'm trying to figure out a way to list several items in a listbox and let the user select any number of items in the listbox. I have tried to code in the items as bitwise items but all it stores...
5
by: Matthew Wells | last post by:
I have a listbox set to simple multi select. For this example, users only select one item at a time. I have command buttons on the form for First, Previous, Next, Last, New (record). The form...
0
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one...
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.