gridview 标题问题
gridview 设置排序后标题头字体大小没发设置大小. --------------------编程问答-------------------- css样式控制也不行? --------------------编程问答-------------------- GridView本身就能设置的吧 --------------------编程问答-------------------- .gvheader /*gridview表头字体样式*/{
font-size:12px;
color:Black;
}
protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
foreach (TableCell cell in e.Row.Cells)
{
cell.CssClass = "gvheader";
}
}
} --------------------编程问答-------------------- 设置headerstyle
--------------------编程问答-------------------- 给gridview写Css样式 --------------------编程问答--------------------
.GridViewHeaderStyle
{
background-color: #5D7B9D;
font-weight: bold;
color: White;
<asp:GridView ID="GridView1" CssClass="GridViewStyle" runat="server" Width="100%" >--------------------编程问答-------------------- 周杰伦真丑 做快的用css控制了
.GridViewHeaderStyle
{
background-color: #5D7B9D;
font-weight: bold;
color: White;
font-size:12px;<!--可以自定义 -->
}
<asp:GridView ID="GvOrder" runat="server" AutoGenerateColumns="False"
CssClass="GridViewStyle" Width="92%" AllowPaging="True" PageSize="20"
onrowcommand="GvOrder_RowCommand"
onrowdatabound="GvOrder_RowDataBound"
onpageindexchanging="GvOrder_PageIndexChanging">
<RowStyle CssClass="GridViewRowStyle" />
<AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
<HeaderStyle CssClass="GridViewHeaderStyle" />
.......
后面的我就不啰嗦了 试试看 --------------------编程问答--------------------
不回应!
无声胜有声!
补充:.NET技术 , ASP.NET