让treeview不显示td网格线 gridview显示网格线
HTML
<style type="text/css">
TD
{
font-size: 9pt;
color: #000000;
font-family: 宋体;
border-right: #6C9FDB 0px solid;
border-top: #6C9FDB 0px solid;
border-left: #6C9FDB 0px solid;
border-bottom: #6C9FDB 0px solid;
border-collapse: collapse;
}
</style>
.cs
protected void myDataGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[1].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[2].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[3].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[4].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[5].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[6].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[7].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[8].Attributes.Add("style", "border:1px #6C9FDB");
e.Row.Cells[9].Attributes.Add("style", "border:1px #6C9FDB");
}
}