data bound listbox + data table select command

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

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!
 
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
 
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.
 
because i didn't know about it :)


Cor said:
Hi Brian,


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
 
Back
Top