Problem with GridView

L

Loading name...

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

Loading name...

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

Jim Andersen

Loading said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top