标签:style blog color div new re
1.cs部分添加隐藏样式IntegratedEquipmentblock.Style.Add("display", "none");
2.gridview添加奇偶行样式 protected void gvIntegratedEquipmentList_RowDataBound(object sender, GridViewRowEventArgs e) { //添加样式-----------begin switch (e.Row.RowType) { case DataControlRowType.Header: e.Row.CssClass = "table01_th"; break; case DataControlRowType.DataRow: if (e.Row.RowIndex > -1) { // 奇数行 if (e.Row.RowIndex % 2 == 0) { e.Row.CssClass = "table01_singlar"; } else { e.Row.CssClass = "table01_double"; } } break; } //------------------end }
3.添加单元格背景色 e.Row.Cells[0].BackColor = (System.Drawing.Color)new WebColorConverter().ConvertFromString("#d0cfce");
标签:style blog color div new re
原文地址:http://www.cnblogs.com/PeaCode/p/3837672.html