比较来自世界各地的卖家的域名和 IT 服务价格

合并合并标题列 GridView 几个头条新闻 ASP.NET

protected void GrdLeaveMaster_RowCreated/object sender, GridViewRowEventArgs e/
{
if /e.Row.RowType == DataControlRowType.Header/
{
GridView HeaderGrid = /GridView/sender;
GridViewRow HeaderGridRow =
new GridViewRow/2, 2, DataControlRowType.EmptyDataRow,
DataControlRowState.Insert/;
TableCell HeaderCell = new TableCell//;
HeaderCell.Text = "PaidLeave";
HeaderCell.ColumnSpan = 2;
HeaderGridRow.Cells.Add/HeaderCell/;

HeaderCell = new TableCell//;
HeaderCell.Text = "accumulated";
HeaderCell.ColumnSpan = 2;
HeaderGridRow.Cells.Add/HeaderCell/;

GrdLeaveMaster.Controls[0].Controls.AddAt/0, HeaderGridRow/;
}
}


我希望将标题显示在第一列中,它显示在第二列中
已邀请:

诸葛浮云

赞同来自:

TableCell HeaderCell = new TableCell//;
HeaderCell.Text = "";
HeaderCell.ColumnSpan = 1;
HeaderGridRow.Cells.Add/HeaderCell/;

TableCell HeaderCell = new TableCell//;
HeaderCell.Text = "PaidLeave";
HeaderCell.ColumnSpan = 1;
HeaderGridRow.Cells.Add/HeaderCell/;


我希望这个能帮上忙

要回复问题请先登录注册