how do i add link column in grid view in asp.net 2.0

P

parez

Hi all,

I have a storep procedure which returns 5 columns.

i want to show only two columsn in the grid view. first column is a
link based on some 3 of the columns.

i added the following in the aspx.

<Columns>
<asp:HyperLinkField headertext="Efdfdvft" DataTextField="fame"
DataNavigateUrlFields="guid"
DataNavigateUrlFormatString="test.aspx?efid={0}" />

<asp:BoundField DataField="fdate"

HeaderText="fdfate"
HtmlEncode="False" SortExpression="Date" />
</Columns>


and in the code behind add this.

gv1.DataSource = cmd.ExecuteReader()

gv1.DataBind()


this gives me 7 columns instead of two.

what should i do ?

thanks in advance
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top