Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to set heading" approximate cost" like
Approximate
cost
Posted
Updated 25-Mar-14 23:13pm
v2
Comments
Tom Marvolo Riddle 10-Mar-14 0:46am    
Try this:
<asp:TemplateField HeaderText="approximate <br/> cost">
Ni!E$H_WAGH 10-Mar-14 0:48am    
Thanks Jas 24
Tom Marvolo Riddle 10-Mar-14 0:49am    
Most welcome!
Aravindba 10-Mar-14 0:53am    
i think in ur gridview heading is long so u need to next line

Try this:

C#
<asp:templatefield headertext="approximate <br/> cost" xmlns:asp="#unknown">
    <itemtemplate>
      //bind
   </itemtemplate>
   </asp:templatefield>
 
Share this answer
 
Try setting HtmlEncode="False" on the headers.
For e.g.
<asp:boundfield headertext="Approximate Cost" datafield="Cost" htmlencode="False" xmlns:asp="#unknown" />
 
Share this answer
 
Comments
Ni!E$H_WAGH 10-Mar-14 0:58am    
Thanks
Hi,
You can do it by applying false to htmlencode=false.

ASP.NET
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false" >
    <columns>
  <asp:boundfield headertext="Approximate <br />Cost" htmlencode="false" />
    </columns>
    </asp:gridview>
 
Share this answer
 
v3
Comments
Ni!E$H_WAGH 10-Mar-14 0:58am    
Thanks
SanSkun 10-Mar-14 0:59am    
Most Welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900