Home All Groups Group Topic Archive Search About

filtering data view with row filter using boolean value

Author
3 Feb 2006 8:27 PM
Brian Henry
say i have a dataset called dv

and i have a boolean value i want to filter by "b_DoesWork"

while the column name in the data view that i want to filter on is called
"Works" how would i filter this since the rowfilter is a string? i tried

dv.rowfilter = "Works = " & b_DoesWork

and get errors back in the IDE that says

Cannot bind to the new value member. Parameter name: value

when I try to set the value of b_DoesWork through a property. what it does
is sets the b_DoesWork = value when the property is set then updates the row
filter to be what i stated above... but that error happens... how would you
go about doing this with a boolean? and technically i will need 5 boolean
filters on that same row filter in the end... because 5 properties can be
set boolean wise on this custom control that will be displaying data based
on the filtered data thanks!

Author
3 Feb 2006 9:50 PM
W.G. Ryan - MVP
concatenate it so that it looks like = "ColumnName = true'
Show quote
"Brian Henry" <nospam@nospam.com> wrote in message
news:O1YISBQKGHA.1676@TK2MSFTNGP09.phx.gbl...
> say i have a dataset called dv
>
> and i have a boolean value i want to filter by "b_DoesWork"
>
> while the column name in the data view that i want to filter on is called
> "Works" how would i filter this since the rowfilter is a string? i tried
>
> dv.rowfilter = "Works = " & b_DoesWork
>
> and get errors back in the IDE that says
>
> Cannot bind to the new value member. Parameter name: value
>
> when I try to set the value of b_DoesWork through a property. what it does
> is sets the b_DoesWork = value when the property is set then updates the
> row filter to be what i stated above... but that error happens... how
> would you go about doing this with a boolean? and technically i will need
> 5 boolean filters on that same row filter in the end... because 5
> properties can be set boolean wise on this custom control that will be
> displaying data based on the filtered data thanks!
>
Author
4 Feb 2006 1:55 PM
Elton W
Hi Brian,

You can try

dv.rowfilter = "Works = " & b_DoesWork.ToString()

HTH

Elton Wang




Show quote
"Brian Henry" wrote:

> say i have a dataset called dv
>
> and i have a boolean value i want to filter by "b_DoesWork"
>
> while the column name in the data view that i want to filter on is called
> "Works" how would i filter this since the rowfilter is a string? i tried
>
> dv.rowfilter = "Works = " & b_DoesWork
>
> and get errors back in the IDE that says
>
> Cannot bind to the new value member. Parameter name: value
>
> when I try to set the value of b_DoesWork through a property. what it does
> is sets the b_DoesWork = value when the property is set then updates the row
> filter to be what i stated above... but that error happens... how would you
> go about doing this with a boolean? and technically i will need 5 boolean
> filters on that same row filter in the end... because 5 properties can be
> set boolean wise on this custom control that will be displaying data based
> on the filtered data thanks!
>
>
>

AddThis Social Bookmark Button