Add/remove columns in a DataGridView automatically according to open database

  • Thread starter Thread starter nvx
  • Start date Start date
N

nvx

Hello,
is it possible to make DataGridView add or remove columns automatically
when opening an Access database? If so, how? I have checked all the
properties of DGV but none seemed to fit this... The connection string
was defined in a Wizard (SELECT * FROM ...).

Thanks for any help...

Regards
nvx
 
What have you tried ? I would just try to use Columns.Clear to clear current
columns and set the datasource again so that the grid creates new columns
(check that AutoGenerateColumns is true)...
 
Patrice, thank you very much. This seems to work as I expected... :)

Have a nice day...

Regards
nvx


Patrice napsal:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top