I've bind the data to a datagridview from a json like this:
dynamic result = JsonConvert.DeserializeObject<List<productData>>(temp);
mproductDataGridView.DataSource = result;
Later i want to do some filtering:
mproductDataGridViewstring rowFilter = string.Format("[{0}] = '{1}'", "type_id", "configurable");
DataTable dt = (DataTable)mproductDataGridView.DataSource;
dt.DefaultView.RowFilter = rowFilter;
There is an error (i translated):
cannot convert system.Collections.Generic.List to System.Data.DataTable object
Anyone know what is the problem? how to fix this?