troubleshooting Question - DataGridView CheckBox Columns

Avatar of Jimbo99999
Jimbo99999Flag for United States of America asked on
Visual Basic.NET
4 Comments2 Solutions1273 ViewsLast Modified:
Good Afternoon Experts!

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)

Any ideas where I can start?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros