A
Anders Eriksson
I want to bind this class to a Datagrid
class StringClass
{
public string StringNumber {get; set;}
public string Tuning {get; set;}
public List<string> Frets {get; set;}
}
I then have a List<StringClass> Fretboard;
So the result would be:
|#|Tuning|0 |1 |2 |...|<Frets.Count>|
|1| F# |F#|G |G#|...
....
So I was hoping that I could use
dataGrid1.ItemsSource = Fretboard;
But I fail because of the List<string> Frets part. I don't know how many
items there are in Frets. It depends on what the users selects.
How would you solve this?
I'm using VS2010 and .NET 4.0
// Anders
PS! The datagrid will be read only
class StringClass
{
public string StringNumber {get; set;}
public string Tuning {get; set;}
public List<string> Frets {get; set;}
}
I then have a List<StringClass> Fretboard;
So the result would be:
|#|Tuning|0 |1 |2 |...|<Frets.Count>|
|1| F# |F#|G |G#|...
....
So I was hoping that I could use
dataGrid1.ItemsSource = Fretboard;
But I fail because of the List<string> Frets part. I don't know how many
items there are in Frets. It depends on what the users selects.
How would you solve this?
I'm using VS2010 and .NET 4.0
// Anders
PS! The datagrid will be read only