Hi,
I've got a class to hold a variable number of column values as shown below:
public class DataEntry{ // List of columns and their values private List<string> columns = new List<string>(); public List<string> Columns { get {return columns;} set {columns = value;} }}
And I've got a list of them in:
List<DataEntry> records = new List<DataEntry>();
How do I set XamDataGrid up such that when I do xdgGrid.DataSource = records, each column will be displayed as an individual column, instead of being nested?
Thanks
XamDataGrid creates columns out of properties on the data source objects. It cannot create columns out of a list of strings. What you could do, however, is create a DataTable whose DataColumns are based on that list of strings, and then bind the XamDataGrid to the DataTable.