Rofl I am sorry :D But I may be crazy or you guys are completely ignoring his code.
Ok few notes to ponder in the above code block.
1. He binds the data source to "comboBox2"
2. He checks for selected index change in "ComBox1"
3. He gets the selected value from "ComBox1"
Since C# is CASE SENSITIVE, these are 3 different combo boxes. The problem MUST be here :)
@sk saini: Please, carefully read through your code again. Ensure you are referring to the CORRECT combo box and this is how you would retrieve the selected value from a combo box
safely.
if (comboBox2.SelectedIndex != -1) {
int selectedValue = (int)comboBox2.SelectedValue;
}
Hope this helps :) Regards