RadioButtonList.RepeatDirection 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
그룹 내에서 라디오 단추가 표시되는 방향을 가져오거나 설정합니다.
public:
virtual property System::Web::UI::WebControls::RepeatDirection RepeatDirection { System::Web::UI::WebControls::RepeatDirection get(); void set(System::Web::UI::WebControls::RepeatDirection value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.RepeatDirection RepeatDirection { get; set; }
public virtual System.Web.UI.WebControls.RepeatDirection RepeatDirection { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.RepeatDirection : System.Web.UI.WebControls.RepeatDirection with get, set
member this.RepeatDirection : System.Web.UI.WebControls.RepeatDirection with get, set
Public Overridable Property RepeatDirection As RepeatDirection
속성 값
RepeatDirection 값 중 하나입니다. 기본값은 Vertical
입니다.
- 특성
예외
목록이 표시되는 방향이 RepeatDirection 값이 아닌 경우
예제
다음 코드 예제에서는 속성을 사용 하 여 RepeatDirection 위쪽에서 아래쪽으로 채워진 열에 컨트롤의 RadioButtonList 항목을 표시 하 고 왼쪽에서 오른쪽으로 표시 하는 방법을 보여 줍니다.
<%@ Page Language="C#" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>RadioButtonList.RepeatDirection Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList1"
RepeatLayout="Table"
RepeatColumns = "2"
RepeatDirection="Vertical"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:RadioButtonList>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>RadioButtonList.RepeatDirection Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList1"
RepeatLayout="Table"
RepeatColumns = "2"
RepeatDirection="Vertical"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:RadioButtonList>
</body>
</html>
설명
컨트롤의 RadioButtonList 표시 방향을 지정 하려면이 속성을 사용 합니다.
참고
표시되는 열 수는 항상 속성에 RepeatColumns 의해 결정됩니다.
이 속성이 설정 RepeatDirection.Vertical
되고 속성이 설정Table되면 RepeatLayout 첫 번째 열이 위쪽에서 아래쪽으로 채워지고 모든 항목이 렌더링될 때까지 다음 열이 채워집니다. 예를 들어 3으로 설정하면 RepeatColumns 컨트롤의 RadioButtonList 항목이 세 개의 열에 표시됩니다. 9개 항목 목록은 다음과 같이 표시됩니다.
1 | 4 | 7 |
2 | 5 | 8 |
3 | 6 | 9 |
이 속성이 설정 RepeatDirection.Horizontal
되고 속성이 설정Table되면 RepeatLayout 목록의 항목이 왼쪽에서 오른쪽으로 로드된 행에 표시되고 모든 항목이 렌더링될 때까지 위쪽에서 아래쪽으로 표시됩니다. 예를 들어 3으로 설정하면 RepeatColumns 컨트롤의 RadioButtonList 항목이 3개 항목의 행에 표시됩니다. 9개 항목 목록은 다음과 같이 표시됩니다.
1 | 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 |