I have a task that I am not quite sure how to accomplish in the code. I have a DataGridView that I am loading from a SQL database query. The records returned will have the first 3 values as regular columns in the DataGridView. The 4th value in the record I need to add a column to the DataGridView as a checkbox and make the heading of the column the actual value. Then each subsequent record that is in the resulting records of the SQL query I don't need to load a new line in the DataGridView, I just need to make a new checkbox column for the 4th value with the actual value as the column header.
So, I will have 1 row in the DataGridView with the first 3 values being standard columns. Then columns 4 on need to be dynamically added in code based on number of results returned form the SQL query.
Username First Last Can Edit Can Update Can Add
BobH Bob H (chk) (chk) (chk)