//Important: first Add column to the collection, Then set properties
GridBoundColumn boundCol = new GridBoundColumn();
boundCol.DataField = "CompanyName";
boundCol.HeaderText = "Company";
This new bound column gets added just fine, however, all of the other columns from the DataTable are added as well.
I've also noticed, that the code I have in my "ColumnCreated" event does not seem to fire on the columns I add dynamically. I have a switch statement that checks the header text to decide what the background color should be set to. This code works just fine on the other columns.
Any ideas what is causing this behavior? Also, if I'm going to long way about either one of these two issues (Setting a specific column order, and conditionally applying a column background color) please let me know. Thank you!