I have objects bound to a DataGrid. I have created a radio button column bound to the Is Default property of the object.

When the app starts up the correct item is shown as default, however the binding is then never updated. The behaviour I would like is for the user to check a radio box and for that object to become the default.

        <DataGrid CanUserAddRows="False" AutoGenerateColumns="False" Name="TEst" >
        <DataGrid.Columns >
            <DataGridTextColumn Header="Value" Binding="{Binding Path=Name, Mode=OneTime}"/>

            <DataGridTemplateColumn Header="Is Default">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <RadioButton GroupName="Test" IsChecked="{Binding IsDefault}" />
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>

        </DataGrid.Columns>
    </DataGrid>

 private class Test : INotifyPropertyChanged
    {
        public string Name
        {
            get;
            set;
        }
        bool isDefult;
        public bool IsDefault
        {
            get
            {
                return isDefult;
            }
            set
            {
                isDefult = value;
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }

    public MainWindow()
    {
        this.InitializeComponent();
        Test[] ya = new Test[] { new Test { Name = "1", IsDefault = false }, new Test { Name = "2", IsDefault = false }, new Test { Name = "3", IsDefault = true } };

        this.TEst.ItemsSource = ya;
    }

I’ve been pulling my hair out all afternoon at this. Any help would be loved.

Edit
Report