PC Review


Reply
Thread Tools Rate Thread

Data Grid displaying columns TWICE!

 
 
=?Utf-8?B?cG11ZA==?=
Guest
Posts: n/a
 
      24th Feb 2005
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??
--
pmud
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q29yZXlNYXM=?=
Guest
Posts: n/a
 
      25th Feb 2005
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

"pmud" wrote:

> 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??
> --
> pmud

 
Reply With Quote
 
=?Utf-8?B?S2FubmFuLlYgW01DU0QubmV0XQ==?=
Guest
Posts: n/a
 
      25th Feb 2005
hi....

set the "AutoGenerateColumns" property of the datagrid to false.

regds
Kannan.V

"pmud" wrote:

> 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??
> --
> pmud

 
Reply With Quote
 
=?Utf-8?B?cG11ZA==?=
Guest
Posts: n/a
 
      25th Feb 2005
ya that was what my prob was...

Thanks )
"CoreyMas" wrote:

> 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
>
> "pmud" wrote:
>
> > 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??
> > --
> > pmud

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data but not in a grid mmm0987@hotmail.com Microsoft ASP .NET 0 18th Oct 2006 09:32 AM
!!!Displaying data in grid!!! Greg Microsoft C# .NET 4 16th Jul 2004 01:09 AM
Displaying a subset of table columns in a data grid seb Microsoft ADO .NET 2 6th Nov 2003 05:30 PM
Displaying only selected columns in data grid? What-a-Tool Microsoft ADO .NET 2 27th Sep 2003 04:58 PM
Displaying only selected columns in a data grid? What-a-Tool Microsoft VB .NET 7 27th Sep 2003 04:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:30 AM.