I am trying to databind the following dynamic list to the datagrid. Is this possible? I am converting a datatble to a dynamic list using ExpandoObject.
Kind regards,
Evert van Ballegooie
public static List<dynamic> ListFromDataTable(DataTable dataTable) { List<dynamic> tableList = new List<dynamic>(); foreach (DataRow row in dataTable.Rows) { var expandoDict = new ExpandoObject() as IDictionary<String, Object>; foreach (DataColumn col in dataTable.Columns) { expandoDict.Add(col.ToString(), row[col.ColumnName]); } tableList.Add(expandoDict); } return tableList; }
Our new home for submitting feature requests is on githubgithub.com/.../issues