I am new to C#. I have a button and a combobox in my winform. I want to enabled my button right after selecting all items of the combobox one by one. Can anyone suggest me with this problem? As i am new so some sudo code will be highly appreciated.
thanks in advance
Loading


Akhil GargRank #772 · 3K reputationPosted Apr 10, 2015, 3:04 AM EDT
Akhil GargRank #772 · 3K reputationPosted Apr 10, 2015, 2:33 AM EDT
If yes then Write a SelectionChanged Event and there you can check if all items are selected (iterate through loop) then make the button enable else make it disable.
Nozibulla Bashar26 reputationPosted Apr 10, 2015, 2:48 AM EDT
Akhil GargRank #772 · 3K reputationPosted Apr 10, 2015, 3:08 AM EDT
cmb_selectionchanged(object sender,
System.EventArgs e)
{
String str=(sender as ComboBox).SelectedValue.ToString();
//Add that string in unilist if that string is already not present in list
//then check all the items are present
--if yes ---enable that button
--else disable that button
}
Nozibulla Bashar26 reputationPosted Apr 10, 2015, 3:10 AM EDT
Akhil GargRank #772 · 3K reputationPosted Apr 10, 2015, 3:12 AM EDT