我正在尝试使用rowspan
2做前两个标题。已经实现了Columnspan
of 2。如何使这两个标头的行跨度为2?请参阅所附图片。
protected void StdGrid_DataBound(object sender, EventArgs e)
{
StdGrid.Rows[0].Cells[0].RowSpan = 2; // not getting desired result
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);
TableHeaderCell cell = new TableHeaderCell();
cell.Text = "";
cell.ColumnSpan = 2;
row.Controls.Add(cell);
cell = new TableHeaderCell();
cell.ColumnSpan = 7;
cell.Text = "MANAGEMENT";
cell.BorderStyle = BorderStyle.Double;
cell.HorizontalAlign = HorizontalAlign.Center;
}