Last post Nov 06, 2018 02:47 AM by Jenifer Jiang
Nov 05, 2018 11:28 AM|JagjitSingh|LINK
I have Gridview in few content pages. I want to style Gridview , want to set Gridview Header row size , rows size , font etc.
Secondly i want that effect is visible in all gridview
Nov 05, 2018 11:27 PM|KathyW|LINK
GridView renders as a table. Give all the GridViews the same class, and define your styles in an external CSS file. Define your styles to target the table, table header, table cells, etc where the table has that class.
Set the GridView CssClass.
<asp:GridView id="GridView1" CssClass="mygridview" runat="server" AutoGenerateColumns="False" DataSourceID="MyDataSource1">
Style the table with that class in an external CSS file, and reference that CSS file in your page.
Nov 06, 2018 02:47 AM|Jenifer Jiang|LINK
If you just want to style the Header Row of Gridview, you could set the Font-Names as the font and Height as the header row size in
More about HeaderStyle, you could refer to: https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.datagrid.headerstyle?view=netframework-4.7.2
<HeaderStyle Font-Names="Arial" Height="100px"/>