Answer the question
In order to leave comments, you need to log in
How to bind columns and rows in DataGrid in WPF?
How to bind 2D structures (like comparison tables) in a DataGrid with dynamically updating bindings? For example, there is an Alternative
class :
public class Alternative : ObservableObject
{
private string _alternativeName = "";
public string AlternativeName
{
get { return _alternativeName; }
set
{
_alternativeName = value;
RaisePropertyChanged();
}
}
private ObservableCollection<Alternative> _childAlternatives = new ObservableCollection<Feature>();;
public ObservableCollection<Alternative> ChildAlternatives
{
get { return _childAlternatives; }
set
{
_childAlternatives = value;
RaisePropertyChanged();
}
}
private MappedValueCollection _childComparison = new MappedValueCollection();
public MappedValueCollection ChildComparison
{
get{ return _childComparison; }
set
{
_childComparison = value;
RaisePropertyChanged();
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question