TableHeaderCell.CategoryText 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
TableHeaderCell 컨트롤에 대한 HTML axis
요소의 th
특성을 가져오거나 설정합니다.
public:
virtual property cli::array <System::String ^> ^ CategoryText { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.StringArrayConverter))]
public virtual string[] CategoryText { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.StringArrayConverter))>]
member this.CategoryText : string[] with get, set
Public Overridable Property CategoryText As String()
속성 값
- String[]
TableHeaderCell 범주를 나타내는 문자열 값 배열입니다.
- 특성
예제
다음 코드 예제에서는 선언적으로 속성을 프로그래밍 CategoryText 하는 방법을 보여 줍니다.
<%@ page language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>TableHeaderCell Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>TableHeaderCell Example</h1>
<asp:table id="Table1" runat="server"
CellPadding="3"
CellSpacing="3"
BorderWidth="1"
GridLines="Both">
<asp:TableHeaderRow ID="TableHeaderRow1" runat="server">
<asp:TableHeaderCell runat="server"
ID="Column1Header"
CategoryText="Column1"
AbbreviatedText="Header 1"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 1 Header
</asp:TableHeaderCell>
<asp:TableHeaderCell runat="server"
ID="Column2Header"
CategoryText="Column2,Column2Alternative"
AbbreviatedText="Header 2"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 2 Header
</asp:TableHeaderCell>
<asp:TableHeaderCell runat="server"
ID="Column3Header"
CategoryText="Column3"
AbbreviatedText="Header 3"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 3 Header
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow HorizontalAlign="Center">
<asp:TableCell AssociatedHeaderCellID="Column1Header"
HorizontalAlign="Left">
(0,0)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column2Header">
(0,1)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column3Header">
(0,2)
</asp:TableCell>
</asp:TableRow>
<asp:TableRow
HorizontalAlign="Center">
<asp:TableCell
AssociatedHeaderCellID="Column1Header"
HorizontalAlign="Left">
(1,0)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column2Header">
(1,1)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column3Header">
(1,2)
</asp:TableCell>
</asp:TableRow>
<asp:TableRow
HorizontalAlign="Center">
<asp:TableCell
AssociatedHeaderCellID=
"Column1Header,Column2Header,Column3Header"
ColumnSpan="3"
HorizontalAlign="Left">
(2,0)
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>
<%@ page language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>TableHeaderCell Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>TableHeaderCell Example</h1>
<asp:table id="Table1" runat="server"
CellPadding="3"
CellSpacing="3"
BorderWidth="1"
GridLines="Both">
<asp:TableHeaderRow ID="TableHeaderRow1" runat="server">
<asp:TableHeaderCell runat="server"
ID="Column1Header"
CategoryText="Column1"
AbbreviatedText="Header 1"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 1 Header
</asp:TableHeaderCell>
<asp:TableHeaderCell runat="server"
ID="Column2Header"
CategoryText="Column2,Column2Alternative"
AbbreviatedText="Header 2"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 2 Header
</asp:TableHeaderCell>
<asp:TableHeaderCell runat="server"
ID="Column3Header"
CategoryText="Column3"
AbbreviatedText="Header 3"
Scope="Column"
HorizontalAlign="Center"
VerticalAlign="Middle"
BackColor="LightGray">
Column 3 Header
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow HorizontalAlign="Center">
<asp:TableCell AssociatedHeaderCellID="Column1Header"
HorizontalAlign="Left">
(0,0)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column2Header">
(0,1)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column3Header">
(0,2)
</asp:TableCell>
</asp:TableRow>
<asp:TableRow
HorizontalAlign="Center">
<asp:TableCell
AssociatedHeaderCellID="Column1Header"
HorizontalAlign="Left">
(1,0)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column2Header">
(1,1)
</asp:TableCell>
<asp:TableCell
AssociatedHeaderCellID="Column3Header">
(1,2)
</asp:TableCell>
</asp:TableRow>
<asp:TableRow
HorizontalAlign="Center">
<asp:TableCell
AssociatedHeaderCellID=
"Column1Header,Column2Header,Column3Header"
ColumnSpan="3"
HorizontalAlign="Left">
(2,0)
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>
설명
범주는 테이블과 관련된 모든 문자열 값일 수 있습니다. 이 CategoryText 속성은 테이블 셀을 axis
개념적 범주로 그룹화하는 데 사용되는 HTML th
요소의 특성으로 렌더링됩니다. 범주는 HTML에서 쉼표로 구분된 목록으로 렌더링됩니다.
이 속성의 값은 뷰 상태에 저장 됩니다.