Michael Maddison
michael at ddisolutions.com.au
Wed Mar 24 20:58:25 CDT 2010
Hi John,
I feel your pain :-)
If you have a BindingSource for the combo you can apply a filter there.
Heres my code for filtering a DataGridView.
BS.Filter = "Archived = False And " + String.Format ( "ReceivedDate >=
'{0:yyyy-MM-dd}'", DateTime.Today.AddMonths (-3 ));
There is a remove filter method as well.
Cheers
Michael M
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Thursday, 25 March 2010 12:45 PM
To: VBA
Subject: [dba-VB] C# Filtered Combos
I am trying to filter a bound combo when another combo changes
selection. I have to tell you this
is overwhelming my tiny mind. My form is bound and I have three combos
also bound. There must be a
DOZEN objects down in the foot of my form - datasets, binding sources,
tableadapters and binding
navigators. Too much stuff. It's like each bound object drags along
three different things just to
make it work.
Am I doing this right? Which piece would I modify to change the sql
that changes the data displayed
in the filtered combo?
--
John W. Colby
www.ColbyConsulting.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.791 / Virus Database: 271.1.1/2749 - Release Date: 03/25/10
06:33:00