Here is the class that populates each row:
public class TableData |
{ |
private string name; |
private Image image = new Image(); |
public string Name |
{ |
get { return name; } |
set { name = value; } |
} |
public Image Picture |
{ |
get { return image; } |
set { image = value; } |
} |
public TableData(string s) |
{ |
Name = s; |
image.Source = new BitmapImage(new Uri("captain-scarlet.jpg", UriKind.RelativeOrAbsolute)); |
} |
} |
Here is how I set up the grid:
ObservableCollection<TableData> theData = new ObservableCollection<TableData>(); |
theData.Add(new TableData("1a")); |
theData.Add(new TableData("2a")); |
radGridView1.ItemsSource = theData; |
The grid view appears and the name column shows data ok, but the image column is blank.
I see in the debugger that both columns in the grid are of type GridViewDataColumn. Should the image one be a GridViewImageColumn? If so, how do I set it up?
Any help appreciated - I'm trying to evaluate it for a potentially big project!
Thanks
Bruce