Binding an IEnumerable collection of business objects to grid using the simple binding method. Users can choose to hide columns on an options page. This causes page to enumerate the columns in the grid and set Visible=False. However, I've noticed that the grid still attempts to bind to the column even though the column is not visible. I'm using custom sorting and no filtering or grouping. I've tried setting the DataField property to an empty string or Nothing, but grid still attempts to bind the column. Of course, without a value for DataField, it throws an exception.
Is there a way to suppress binding to non-visible columns?
Is there a way to suppress binding to non-visible columns?