Results 1 to 5 of 5

Thread: [2005] Using a filter on BindingSource with BindingList

Hybrid View

  1. #1
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Using a filter on BindingSource with BindingList

    I just don't understand why, if something doesn't work, consulting the help is not the first thing that everyone does. The MSDN doco for that property says:
    Property Value
    true if the list is an IBindingListView and supports filtering; otherwise, false.

    Remarks
    If the list is not an IBindingListView, SupportsFiltering always returns false.
    Does the BindingList class implement the IBindingListView interface? The answer is NO. There are not many classes that do. BindingSource and DataView do, and I'm not aware of any others in the Framework, although there may be some. The fact that DataView does is the reason that you can bind and filter DataTables. If you want a list that supports filtering then you have to implement it yourself.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  2. #2

    Thread Starter
    Lively Member mightor's Avatar
    Join Date
    Apr 2007
    Location
    Turn around, I'm right behind you...
    Posts
    99

    Re: [2005] Using a filter on BindingSource with BindingList

    Well, I did consult the MSDN docs and Googled like there was no tomorrow. I spent more than 4 hours trying to figure this out before even writing my OP. I still lack a great deal of understanding of how some things in VB work, especially when it comes to the nitty gritty stuff like that. I put the BindingList in a BindingSource, in the assumption that that would give me the filtering ability, as per the MSDN docs. I will take a look at the DataView class and see how I can use that.

    Gr,
    Mightor
    What the world needs is more geniuses with humility, there are so few of us left.
    If my post was accidentally useful, please rate it as such, thanks!
    Mon aéroglisseur est plein des anguilles.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width