filtering data view with row filter using boolean value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Henry

    #1

    filtering data view with row filter using boolean value

    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!


  • W.G. Ryan - MVP

    #2
    Re: filtering data view with row filter using boolean value

    concatenate it so that it looks like = "ColumnName = true'
    "Brian Henry" <nospam@nospam. com> wrote in message
    news:O1YISBQKGH A.1676@TK2MSFTN GP09.phx.gbl...[color=blue]
    > 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!
    >[/color]


    Comment

    • Elton W

      #3
      RE: filtering data view with row filter using boolean value

      Hi Brian,

      You can try

      dv.rowfilter = "Works = " & b_DoesWork.ToSt ring()

      HTH

      Elton Wang




      "Brian Henry" wrote:
      [color=blue]
      > 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!
      >
      >
      >[/color]

      Comment

      Working...