TableHeaderCell Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the TableHeaderCell class.
public:
TableHeaderCell();
public TableHeaderCell ();
Public Sub New ()
Examples
The following example demonstrates how to programmatically add a TableHeaderCell control to a Web page. For a complete, working code example, see the TableRow class overview topic.
// Create a header for the table.
TableHeaderCell header = new TableHeaderCell();
header.RowSpan = 1;
header.ColumnSpan = 3;
header.Text = "Table of (x,y) Values";
header.Font.Bold = true;
header.BackColor = Color.Gray;
header.HorizontalAlign = HorizontalAlign.Center;
header.VerticalAlign = VerticalAlign.Middle;
// Add the header to a new row.
TableRow headerRow = new TableRow();
headerRow.Cells.Add(header);
// Add the header row to the table.
Table1.Rows.AddAt(0, headerRow);
' Create a header for the table.
Dim header As New TableHeaderCell()
header.RowSpan = 1
header.ColumnSpan = 3
header.Text = "Table of (x,y) Values"
header.Font.Bold = True
header.BackColor = Color.Gray
header.HorizontalAlign = HorizontalAlign.Center
header.VerticalAlign = VerticalAlign.Middle
' Add the header to a new row.
Dim headerRow As New TableRow()
headerRow.Cells.Add(header)
' Add the header row to the table.
Table1.Rows.AddAt(0, headerRow)
Remarks
Use this constructor to create and initialize a new instance of the TableHeaderCell class.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET