Hi guys,
I'm using the MVVM pattern and I've got my RadGridView bound to a BindingList of business objects, within the business objects there are various strings and a binding list of decimals. Below is a stripped down version of the set up I have:
public class ARow
{
string column1;
string column2;
BindingList<decimal> values;
}
BindingList<ARow> allRows;
XAML:
<telerik:RadGridView ItemsSource = "{Binding allRows, Mode=TwoWay}">
The columns are manually added and have two way binding set up in the code behind.
I would like to implement two way data binding whereby changes to values in the BindingList<decimal> values will be reflected in the grid itself. I am able to successfully change the underlying data source however this is not reflected in the grid itself.
I have also tried, instead of using "decimal" using a custom class "ValueObject" I created which contains a decimal property as follows, but to no avail. The code is as follows:
public class ValueObject : INotifyPropertyChanged
{
_private decimal _value;
public decimal Value
{
get { return _value; } set { _value = value; OnPropertyChanged("Value"); }
}
}
Any help would be great!
Cheers,
Tim.
I'm using the MVVM pattern and I've got my RadGridView bound to a BindingList of business objects, within the business objects there are various strings and a binding list of decimals. Below is a stripped down version of the set up I have:
public class ARow
{
string column1;
string column2;
BindingList<decimal> values;
}
BindingList<ARow> allRows;
XAML:
<telerik:RadGridView ItemsSource = "{Binding allRows, Mode=TwoWay}">
The columns are manually added and have two way binding set up in the code behind.
I would like to implement two way data binding whereby changes to values in the BindingList<decimal> values will be reflected in the grid itself. I am able to successfully change the underlying data source however this is not reflected in the grid itself.
I have also tried, instead of using "decimal" using a custom class "ValueObject" I created which contains a decimal property as follows, but to no avail. The code is as follows:
public class ValueObject : INotifyPropertyChanged
{
_private decimal _value;
public decimal Value
{
get { return _value; } set { _value = value; OnPropertyChanged("Value"); }
}
}
Any help would be great!
Cheers,
Tim.