showheader=false but still shows header

G

Guest

My grid has a template field, and for me to export it to excel and hide the
columns in excel i had to add headers to my template fields. I have header
text and I have showHeader =false but the header text is still showing on the
web form.
I don't want that, so how can I hide the header text in my gridview on my
web form? Is there another way to accomplish this and now show the headers in
the grid and also to hide that column when i export it to excel?


<asp:TemplateField HeaderText="Sales" ShowHeader="False">
<ItemTemplate>
<a class="link"
href="saledetails.aspx?id=<%# Eval("Id") %>&salesmen=<%#
Eval("lastName")%>&date=<%# Eval("salesdate") %>">details</a>
</ItemTemplate>
</asp:TemplateField>
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top