-
Jan 4th, 2008, 04:13 PM
#1
Thread Starter
Member
[2005] How to remove BindingSource.Filter?
I have KbcartBindingSource.Filter = "cart_id='" & TextBox1.Text & "'" this changes my DataGridView to only show the cart with the ID the user typed in. How do I reset the DataGridView to show all of the Carts again?
Rick
Last edited by mousewonders; Jan 4th, 2008 at 04:17 PM.
-
Jan 4th, 2008, 04:17 PM
#2
Thread Starter
Member
Re: [2005] How to remove BindingSource.Filter?
I figured it out: KbcartBindingSource.Filter = String.Empty
-
Jan 4th, 2008, 04:19 PM
#3
Hyperactive Member
Re: [2005] How to remove BindingSource.Filter?
KbcartBindingSource.Filter = String.Empty
dgv1.DataSource = original value
Should work?
(Sorry, I posted the response and you had updated the thread already...)
-
Jan 4th, 2008, 07:55 PM
#4
Re: [2005] How to remove BindingSource.Filter?
A simple look at the MSDN documentation for the BindingSource class would have shown you RemoveFilter method. As you can see from the attached screen shot though, only someone with a thorough understanding of VB already could have possibly deciphered it. Then again, maybe anyone who can read English would have. The documentation for the BindingSource.Filter property also specifically states:
To stop filtering the DataSource, call the RemoveFilter method.
As I have already said elsewhere, the documentation is for everyone. If you don't read it you only hurt yourself. You found an answer this by yourself, for which I congratulate you, but you obviously still ignored the documentation. Reading the documentation will help make you a better developer. Is that not the aim?
By the way, I do have more than one string to my bow. I have provided plenty of code and advice over the years, as you may be able to see by my post count and reputation. I would like to see everyone learn as much as possible though, and the way to do that is to read. My advice will help you if you let it. You're the one who'll suffer if you don't. Obviously, it's your choice.
Last edited by jmcilhinney; Feb 9th, 2008 at 04:13 AM.
-
Dec 13th, 2016, 04:38 AM
#5
Re: [2005] How to remove BindingSource.Filter?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|