I have a project which dynamically generates a grid and populates it with a DataSource (using LINQ to SQL) and returns it to another process which then places that on a form.
It appears from my testing that the Columns collection is not accessible unless the Grid has been associated with a Form prior to the DataSource being assigned as I am getting null reference when trying to access a column unless it occurs in that sequence.
Is there some method that can be called to populate the columns from the datasource, as there is no actual form available at the time the Grid is created?
Imported from legacy forums. Posted by Craig (had 1922 views)