C # WinForm in the same group of multiple RadioButton use techniques, because the use of, summary classification, make a record
You can define a method to handle the group RadioButton, as follows:
public void Allradio_checkedchanged (object sender, EventArgs e)
{
if (!) ( (RadioButton) sender). Checked)
{return
;
}
String stext = String. Empty;
Switch ((RadioButton) sender). Name
{case
"Shradio":
stext = "query data";
Panel5. Visible = true;
Panel6. Visible = false;
break;
Case "Mdradio":
stext = "Modify data";
Panel6. Visible = true;
Panel5. Visible = false;
break;
Case "Delradio":
stext = "delete data";
Panel5. Visible = true;
Panel6. Visible = false;
break;
Groupbox3.text = stext;
Button1. Text = stext;
Ismodify (true);
When the definition is complete, the checkchanged time of the RadioButton involved will be selected to match the different RadioButton values according to the button selection