RadioButtonList.RepeatColumns 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
RadioButtonList 컨트롤에 표시할 열의 수를 가져오거나 설정합니다.
public:
virtual property int RepeatColumns { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public virtual int RepeatColumns { get; set; }
public virtual int RepeatColumns { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.RepeatColumns : int with get, set
member this.RepeatColumns : int with get, set
Public Overridable Property RepeatColumns As Integer
속성 값
RadioButtonList에 표시할 열의 수입니다. 기본값은 0으로, 이 속성이 설정되지 않았음을 나타냅니다.
- 특성
예외
열의 수가 음의 값으로 설정된 경우
예제
다음 코드 예제에서는 두 열에 RepeatColumns 컨트롤의 RadioButtonList 항목을 표시 하는 속성을 사용 하는 방법을 보여 줍니다.
<%@ Page Language="C#" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>RadioButtonList.RepeatColumns Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList1"
RepeatLayout="Table"
RepeatColumns = "2"
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.RepeatColumns Example</title>
</head>
<body>
<asp:RadioButtonList id="RadioButtonList1"
RepeatLayout="Table"
RepeatColumns = "2"
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>
설명
속성이 RepeatLayout 설정 Table되면 이 속성을 사용하여 컨트롤에 항목을 RadioButtonList 표시하는 열 수를 지정할 수 있습니다. 이 속성을 설정하지 않으면 컨트롤은 목록의 RadioButtonList 모든 항목을 단일 열에 표시합니다.