Click here to Skip to main content
15,909,332 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i have Checked Combobox.. Items are

Squared Off TO
Delivety TO
Squared Off Buy TO
Squared Off Sell TO
Delivery Buy TO
Delivery Sell TO

Now, if he select "Squared Off TO" user should be able to select either "Delivery TO" Or "(Delivery Buy TO and Delivery Sell TO)".. same way, if he select "Delivery TO", he should be able to select either "Squared Off TO" or (Squared Off Buy TO and Squared Off Sell TO).. hw How can I do this... help me out..
Posted
Updated 21-Apr-12 12:11pm
v2
Comments
Sandeep Mewara 21-Apr-12 7:55am    
There is one Combobox and you are talking dependencies here. Not clear!

Is it multiselect? Or do you want 2nd combobox dependant one first one?
DileepkumarReddy 21-Apr-12 7:57am    
It is same Checked Combobox...
Herman<T>.Instance 22-Apr-12 1:10am    
please show your code.
do you use OnSelectedIndexChanged event?
SASS_Shooter 23-Apr-12 11:38am    
It would be great if you showed what you've tried so far.
It sounds like you're trying to do too much with one control.

1 solution

I did decide to answer question, though i'm not sure what you want to achieve...

Probably you want to enable some extra functionality depend on status of top level checkbox, for example:

[ ] Squared Off TO
|----------------[ ] Delivery Buy TO
|----------------[ ] Delivery Sell TO
[x] Delivery TO
|----------------[x] Squared Off Buy TO
|----------------[x] Squared Off Sell TO


First of all, read some articles on codeproject site. Maybe you'll find an answer.
A ComboBox with a CheckedListBox as a Dropdown[^]
Custom ComboBoxes with Advanced Drop-down Features[^]
CCheckComboBox II[^]

Similar functionality to CheckedComboBox has a CheckedListBox control. Take a look at this[^] discussion, where you'll find a sample code that can be used in the ItemCheck event of a CheckedListBox to make items disable.

But i recomend you to use treeview[^] control, which is more flexible to you, becouse it has nodes and childnodes, which can be displayed as checkboxes.

I found something EXTRA! Here[^] you'll find an article about: How to hide checkbox of the certain TreeNode in TreeView control.

I hope it will be helpful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900