Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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