Data Grid displaying columns TWICE!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have 4 columns in my sql database table. I added a data adapter , data set
& a data grid to view this information. But the data grid is displaying those
4 columns TWICE , i.e in the data grid i see 8 columns.

In case this is useful, the primary key is Serial no. which is an identity
....i.e everytime a row is added to the database, it increments by1. Also,
when i configured the data adapter, it couldnt Generate the UPDATE & DELETE
statements coz it said error congiguring update & delete
statements...Though,I dont need update & delete ....

Any ideas why this data grid is diaplaying the same columns twice??
 
Did you add columns to your datagrid (like template columns or button
columns) etc and define what fields in the table to use for these columns?

If you answered yes above check the property on the datagrid called
AutoGenerateColumns -- it is set to true by default. If it is set to true
set it to false

Corey

Setting it to
 
ya that was what my prob was...

Thanks :))
CoreyMas said:
Did you add columns to your datagrid (like template columns or button
columns) etc and define what fields in the table to use for these columns?

If you answered yes above check the property on the datagrid called
AutoGenerateColumns -- it is set to true by default. If it is set to true
set it to false

Corey

Setting it to
 
Back
Top