I\'m currently working on databinding some of my existing Windows Forms, and I\'ve ran into an issue figuring out the proper way of databinding a group of radiobutton contro
My approach is to put each radio button into its own panel before binding them to a boolean property:
public static Binding Bind(this RadioButton control, object dataSource, string dataMember)
{
// Put the radio button into its own panel
Panel panel = new Panel();
control.Parent.Controls.Add(panel);
panel.Location = control.Location;
panel.Size = control.Size;
panel.Controls.Add(control);
control.Location = new Point(0, 0);
// Do the actual data binding
return control.DataBindings.Add("Checked", dataSource, dataMember);
}