Click here to Skip to main content
15,868,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 ComboBoxes I want to archive something like this, When i select the combobox1 last value the combobox2 last value will be automatically selected,How can i archive this using C# Code, please help me,
Posted

1 solution

C#
// SelectionChanges or SelectedIndexChanged
Combobox1_SelectedIndexChanged(... ....)
{
    if(Combobox1.SelectedIndex == (Combobox1.Items.Count -1))
    {
        Combobox2.SelectedIndex = Combox2.Items.Count - 1;
    }
}

Should work :)

-KR
 
Share this answer
 
Comments
Niha Sharma 17-Oct-15 8:14am    
+-+ +-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+
|A| |B|i|g| |T|h|a|n|k|s| |K|r|u|n|a|l|R|o|h|i|t|
+-+ +-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+

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