If GridView is bound to a SqlDataScource control, which has a select statement, GridView will produce an error if that select statement is later changed programmatically to select a different set of columns, the error is
'System.Data.DataRowView' does not contain a property with the name [An Expected Column Name]
How could one execute different select statements from time to time that return different columns and display their results in a GridView ?
Thanks
AutoGenerateColumns
of the grid is set to true or before the binding, check if you have to add or remove elements fromGrid.Columns