There's a couple of ways you can add this. I assume you are using some
version of Visual Studio 2005/Express... In the designer, the smart
tag/menu has an "Edit Items" command that will open a new window and
you can add the item there (add a BoundField). In the properties, put
the column name from your query into the "DataTextField" property.
This is the easiest of methods...
If you are more comfortable with the code or are not using an IDE like
VS 2005, then locate the control in your source and add the following
to <asp:GridView- <Columns>
<asp:BoundField DataField="data_age" HeaderText="Age"
SortExpression="data_age"/>
Replace 'data_age' with whatever your query is returning.
Curious Trigger wrote:
Hi there,
I have got a gridview showing a display-name of a person and keeping its
person-id as value accessible.
Now I am wondering how I can get to his age, if this field isn't visible in
the gridview but definied in the underlying datasource (a dataset)?
Has anyone got a idea on this problem?
Thank you for your quick answers!
Sincerly yours,
Curious SQL-Trigger