PC Review


Reply
Thread Tools Rate Thread

data bound listbox + data table select command

 
 
Brian Henry
Guest
Posts: n/a
 
      27th Feb 2004
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!


 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      27th Feb 2004
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


 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      27th Feb 2004
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:#ES0nWU$(E-Mail Removed)...
> 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!
>
>



 
Reply With Quote
 
Brian Henry
Guest
Posts: n/a
 
      27th Feb 2004
because i didn't know about it


"Cor" <(E-Mail Removed)> wrote in message
news:uJGaYoU$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data bound listbox not updating... Spock Microsoft VB .NET 1 21st Jan 2005 08:05 PM
Updating data bound listbox VB Programmer Microsoft ASP .NET 1 21st Jul 2004 07:18 PM
OwnerDrawn Listbox data bound Brian Henry Microsoft VB .NET 2 11th Mar 2004 12:56 AM
data bound listbox + data table select command Brian Henry Microsoft ADO .NET 3 27th Feb 2004 04:02 PM
Listbox select record bound or unbound? and how to limit edit of data? Darryn Microsoft Access Forms 2 14th Oct 2003 10:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:16 AM.