T
Trevisc
I have a datagrid that gets its data from a table who's columns are
dynamically created.
It loads perfectly the first time but I have a dropdown list that is
populated with names of months and the idea is to have them click a
month (december for example) and then the datatable gets populated
with the data specific to December and brings it back to the
gridview. When I do this I get an error on the gridview.databind line
that essentially says one of the column names that was previously here
in the grid (11-01-2007 for example) is not in the datasource.
Here is an example of what the error looks like:
dgOrders.DataSource = dt
dgOrders.DataBind() <---- ERROR HERE
A field or property with the name '11-01-2007' was not found on the
selected data source.
dynamically created.
It loads perfectly the first time but I have a dropdown list that is
populated with names of months and the idea is to have them click a
month (december for example) and then the datatable gets populated
with the data specific to December and brings it back to the
gridview. When I do this I get an error on the gridview.databind line
that essentially says one of the column names that was previously here
in the grid (11-01-2007 for example) is not in the datasource.
Here is an example of what the error looks like:
dgOrders.DataSource = dt
dgOrders.DataBind() <---- ERROR HERE
A field or property with the name '11-01-2007' was not found on the
selected data source.