• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 685
  • Last Modified:

Header Font Size in Grid View

Hello Experts,
In a GridView, I am trying to change the font size of a Header column.  I used HeaderStyle-CssClass property.  Though it is not giving any error, it is not working.  I tried to change it to a Templete Field and used the CSS.  Still no good.  Please let me know what is the best way.

Thank you in advance.
0
RadhaKrishnaKiJaya
Asked:
RadhaKrishnaKiJaya
  • 2
  • 2
  • 2
1 Solution
 
HainKurtSr. System AnalystCommented:
need sample or link to the page or html output
0
 
RadhaKrishnaKiJayaAuthor Commented:
Huseyin,
The GridView is a regular one.  All I need is change the Header font using Style Sheet.  Because of the Company policy I will not be able to post the code.

Thank you!
0
 
HainKurtSr. System AnalystCommented:
nobody can help you if you don't post html or give us link to that page or do not create a sample page...
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Ryan ChongCommented:
try use HeaderStyle-Font-Size instead:

like:

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" ShowFooter ="True"
            AllowSorting="True" AutoGenerateColumns="False"  
            HeaderStyle-Font-Size="18px"
            DataSourceID="SqlDataSource1" EmptyDataText="No data" CellPadding="4"
            ForeColor="#333333" GridLines="None">
0
 
Ryan ChongCommented:
to change template header's style use HeaderStyle tag, like:

<asp:TemplateField HeaderText="Compare Distance">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckPostcode" AutoPostBack="true" runat="server" OnCheckedChanged="ckPostcode_CheckedChanged" />
                    </ItemTemplate>
                    <HeaderStyle BackColor="#00CC99" BorderColor="#CC00FF" Font-Bold="True" 
                        Font-Size="14px" />
                </asp:TemplateField>

Open in new window


you can set the settings via the wizard available.
0
 
RadhaKrishnaKiJayaAuthor Commented:
Ryan,
Thank you.  This is how I exactly did it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now