I create a DataTable with the column names: Car Make, Car Model, Car Id
I then bind the DataTable to an aspx Gridview ( Devexpress ).
I then later on in the program, want to change the DataTable to have fieldnames of:
Airplane Make, Airplane Model, Airplane Id
I bind it to the same Gridview and end up with a message like:
A field or property with name 'Car Make' was not found in the selected data source. Possible causes of this error may be the following: an incorrect or case-insensitive spelling of the grid column name; assigning a wrong or not properly initialized data source to the grid.
I have tried to do:
ASPxGridView1.Columns.Clear();
ASPxGridView1.DataSource = null;
ASPxGridView1.DataBind();
ASPxGridView1.DataSource = ds.Tables[0];
ASPxGridView1.DataBind();
This clears out the gridview totally without adding my new records. Any ideas anyone?
true? - Josh Darnell