Binding to datagridview

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

I have a datatable with 3 fields, and I want to bind each one of these
fields to one my Windows datagridview. In my case I have three datagridviews
with one column each. Is this possible? Even if the grid has one column,
when I bind the datatable with this grid, it'll display all three fields.
I'm using VS2005 v2.0 and winforms.

Any help is appreciated.

Thanks.
 
Set AutoGenerateColumns to false, and manage the columns yourself,
using DataPropertyName to specify the field name.

Marc
 
Thanks for the info. I thought this grid was like the Web Form grid where
the property could be set at design mode.

Thanks again.
 
Back
Top