Hi,
I have a collection of objects which I want to bind to a RadGridView. The class of the objects is looking like that (minimum code needed to understand) where I have 1 property and 1 array of values which :
public class AttributeEntry : INotifyPropertyChanged
{
public string Code { get; set; }
private string[] _values;
public string[] Values
{
get { return _values; }
set { _values = value; }
}
public string this[int index]
{
get { return _values[index]; }
set
{
_values[index] = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(Binding.IndexerName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
Is someone know a (simple) way, using the patern MVVM, to have a RadGridView with some columns defined (in my case corresponding to the 'Code' property) and some columns "autogenerated" with each columns corresponding to the elements of a collection (in my case the elements of the array 'Values". If I have 7 values in my collection, I should have 7 "autogenerated" columns).
I have a collection of objects which I want to bind to a RadGridView. The class of the objects is looking like that (minimum code needed to understand) where I have 1 property and 1 array of values which :
public class AttributeEntry : INotifyPropertyChanged
{
public string Code { get; set; }
private string[] _values;
public string[] Values
{
get { return _values; }
set { _values = value; }
}
public string this[int index]
{
get { return _values[index]; }
set
{
_values[index] = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(Binding.IndexerName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
Is someone know a (simple) way, using the patern MVVM, to have a RadGridView with some columns defined (in my case corresponding to the 'Code' property) and some columns "autogenerated" with each columns corresponding to the elements of a collection (in my case the elements of the array 'Values". If I have 7 values in my collection, I should have 7 "autogenerated" columns).