我想在我的GridView中的每一行之間設置線條。我的解決辦法是C#類庫SP:ASP.NET - 在GridView中的每行之間設置線條
這是我的GridView代碼:
SPGridView TableResult = new SPGridView();
TableResult.AutoGenerateColumns = false;
TableResult.Style.Value = " width: 30%; runat:server; text-align: center; background-color:#FAEBD7; margin: 5px 0 10px 0; border: solid 2px #525252; border-collapse:collapse; font-family:Calibri; color: #474747;";
TableResult.AllowSorting = true;
TableResult.Width = 1500;
TableResult.Font.Size = 15;
TableResult.CellPadding = 5;
TableResult.CssClass = "mGrid";
TableResult.PagerTemplate = null;
TableResult.ID = "GridView2";
TableResult.GridLines ........................... ?
更多細節:
DataView mydataview2 = new DataView(table2);
table2 = mydataview2.ToTable(true, "KmInCity", "KmOutCity", "lKmTotal");
TableResult.DataSource = table2;
TableResult.DataBind();
你讀過[這個MSDN(https://msdn.microsoft.com/EN-US/library/c31tzf4s)?只需在SPGridView上快速瀏覽一下,就可以在MSDN上找到該頁面。 – t0mm13b
myGrid.GridLines = GridLines.Horizontal;與此不工作... – Gohyu
你有一個'System.Web.UI.WebControls'及其相應的DLL的引用? – t0mm13b