Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

How do I block the DataGridView from forcing any new columns from the generic list?

I have a generic list as a DataSource for a DataGridView, but it's adding columns I do not want to the DataGridView.

I have four columns pre-configured in the DataGridView, using the designer. I'd like no more columns in the DataGridView.

Please tell me how to limit this.

Thanks,
newbieweb
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

Fernando,

How are you doing?! Long time...

I do not see the AutoGenerateColumns property in the DataGridView. Is it buried somewhere?

Thanks,
newbieweb
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oops sorry.. refresh problem.
Its done in code-behind.
Thanks!
Thanks I am doing great and yourself?

Sorry that property is not available through the designer must use code.

dataGridView1.AutoGenerateColumns = false;
Not a problem, glad I was able to help.  

Have a great day.  ;=)