My scenario:
User decides whether he checkes CheckBox or not. Checked state is valid only if an item in ComboBox is selected. I Want to display an error message when user tries to check CheckBox without selecting item in ComboBox
My first idea...
in onclick event of checkBox
- Code: Select all
if(control.Checked && !isSomethingSelected)
{
DisplayError("Please select an item."); //Windows.Forms.MessageBox.Show(...);
control.Checked= false;
return;
}
Unfortunatelly, this doen't work, checkbox stays checked.
How can i achieve this functionality? Thanks for any help
