Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with GridView

Reply
Thread Tools

Problem with GridView

 
 
Loading name...
Guest
Posts: n/a
 
      08-29-2006
Hey

asp.net 2.0

I have a GridView on my webpage. This GridView's datasource is a
SqlDataSource. The SqlDataSource returns 3 columns.

Here is my problem:
My GridView consist of 3 columns (id column + 2 text columns). I want to
hide the id column, and change the formating of the text columns. I've tryed
using "Edit Columns". But my BoundFields don't appear in the "Selected
Field"-section. Adding them to the "Selected Field"-selection causes each of
this columns to appear twice in the GridView.

I also tryed to do the column formating directly in the html source, but
there I don't see these columns at all. This is the only column I see:
<columns>
<asp:CommandField ShowSelectionButton="True" />
</columns>

Any suggestions on how I should fix this problem?


 
Reply With Quote
 
 
 
 
Loading name...
Guest
Posts: n/a
 
      08-29-2006
I've solved the problem by deleting the GridView and its SqlDataSource, and
then add a new GridView onto the webpage. However, it would be interesting
to know what I did wrong with my first GridView?


"Loading name..." <it_consultant1@NO_SPAM.hotmail.com> wrote in message
news:(E-Mail Removed)...
> Hey
>
> asp.net 2.0
>
> I have a GridView on my webpage. This GridView's datasource is a
> SqlDataSource. The SqlDataSource returns 3 columns.
>
> Here is my problem:
> My GridView consist of 3 columns (id column + 2 text columns). I want to
> hide the id column, and change the formating of the text columns. I've
> tryed using "Edit Columns". But my BoundFields don't appear in the
> "Selected Field"-section. Adding them to the "Selected Field"-selection
> causes each of this columns to appear twice in the GridView.
>
> I also tryed to do the column formating directly in the html source, but
> there I don't see these columns at all. This is the only column I see:
> <columns>
> <asp:CommandField ShowSelectionButton="True" />
> </columns>
>
> Any suggestions on how I should fix this problem?
>



 
Reply With Quote
 
 
 
 
Jim Andersen
Guest
Posts: n/a
 
      08-29-2006
Loading name... wrote:
> I've solved the problem by deleting the GridView and its
> SqlDataSource, and then add a new GridView onto the webpage. However,
> it would be interesting to know what I did wrong with my first
> GridView?


Maybe you checked the "autogenerate columns" ?

/jim


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Gridview inside gridview problem Vik ASP .Net 1 05-11-2009 10:07 PM
GridView RowCommand problem: GridView Nested in Repeater HeavyMetal ASP .Net Web Controls 0 08-08-2006 01:17 PM
GridView Hierarchical View - Gridview in Gridview =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 1 05-09-2006 06:48 PM
GridView in a GridView Nalaka ASP .Net 6 12-05-2005 05:48 PM
Gridview with combobox whose data is dependent on field in gridview wallermj@hotmail.com ASP .Net 3 11-21-2005 05:34 PM



Advertisments