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:
 
Back
Top