Hi all!

I have a custom datasource class with some boolean properties that i want to
bind to some RadioButtons in the UI. The RadionButtons are located in the
same GroupBox.
But the effect is, that the DataBinding will create some feedback that fails
the control/datasource communication. When i click a not checked RadioButton,
both RadioButtons are not checked afterwards.
(I use the .Net Framework 2.0)

Any solutions?
Thanks in advance
Ulrich


public class MyDataSource : INotifyPropertyChanged
{
private bool aChecked;

public bool AChecked
{
get { return aChecked; }
set
{
aChecked = value;
this.firePropertyChanged("AChecked");
}
}

private bool bChecked;

public bool BChecked
{
get { return bChecked; }
set
{
bChecked = value;
this.firePropertyChanged("BChecked");
}
}

private void firePropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
this.PropertyChanged(this, new
PropertyChangedEventArgs(propertyName));
}

#region INotifyPropertyChanged Members

public event PropertyChangedEventHandler PropertyChanged;

#endregion
}




public partial class Form1 : Form
{
private MyDataSource myDataSource;

public Form1()
{
InitializeComponent();

this.myDataSource = new MyDataSource();

this.rbA.DataBindings.Add(new Binding("Checked", myDataSource,
"AChecked", false, DataSourceUpdateMode.OnPropertyChanged));
this.rbB.DataBindings.Add(new Binding("Checked", myDataSource,
"BChecked", false, DataSourceUpdateMode.OnPropertyChanged));
}
}