Solved

Implementing Combo box filter on window form : C# .NET 1.1

Posted on 2006-11-14
3
1,827 Views
Last Modified: 2012-06-27
Hi,
I am currently using .net framework1.1  and window forms.
In one form i got two combo boxes in which values are coming from two different tables.
I want to make it such that if a user selects item from the first combo box
it filters the values and shows only relavent ones in the second combo box.
Please give some idea or option to do it.

thanks
0
Comment
Question by:AbhilashN
3 Comments
 
LVL 5

Accepted Solution

by:
rameedev earned 500 total points
ID: 17944945
There are couple of ways of doing it....

1) Load first combobox from first table. On selecting a vlues from the 1st combo get the value and use it to construct a sql statement based on this value and use it to load the 2nd combo,

// other way

2) Load 2 datasets from both the sql tables and use the first one to bind it to the 1st combo. On selecting a value from the first combo use the selected value to make a query on the 2nd dataset you will get an array of datarows...use it to constrcut datatable and bind it to the 2nd combo.

the 2nd dataset loaded initially must also have the column which is there in the 1st combo
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Exceptions 3 46
Finally almost got it 5 36
SqlDependency to get update from sql to my c# app 2 40
FTP file download using c# 3 23
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question