Aracılığıyla paylaş


RadioButtonList.RepeatDirection Özellik

Tanım

Grup içindeki radyo düğmelerinin görüntüleneceği yönü alır veya ayarlar.

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

Özellik Değeri

Değerlerden RepeatDirection biri. Varsayılan değer: Vertical.

Öznitelikler

Özel durumlar

Listenin görüntüleme yönü değerlerden RepeatDirection biri değildir.

Örnekler

Aşağıdaki kod örneği, yukarıdan aşağıya ve ardından soldan RepeatDirection sağa doldurulmuş sütunlarda bir RadioButtonList denetimin öğelerini görüntülemek için özelliğinin nasıl kullanılacağını gösterir.

<%@ 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>

Açıklamalar

Denetimin görüntüleme yönünü RadioButtonList belirtmek için bu özelliği kullanın.

Uyarı

Görüntülenen sütun sayısı her zaman özelliği tarafından RepeatColumns belirlenir.

Bu özellik olarak RepeatDirection.Vertical ayarlanırsa ve özelliği olarak TableayarlanırsaRepeatLayout, ilk sütun yukarıdan aşağıya doğru doldurulur, sonra sonraki sütun ve tüm öğeler işlenene kadar böyle devam eder. Örneğin, 3 olarak ayarlanırsa RepeatColumns , denetimin RadioButtonList öğeleri üç sütunda görüntülenir. Dokuz öğeli bir liste aşağıdaki gibi görünür.

Sütun 1 Sütun 2 Sütun 3
1 4 7
2 5 8
3 6 9

Bu özellik olarak RepeatDirection.Horizontal ayarlanırsa ve özelliği olarak ayarlanırsa RepeatLayoutTable, listedeki öğeler, tüm öğeler işlenene kadar soldan sağa, sonra yukarıdan aşağıya yüklenen satırlarda görüntülenir. Örneğin, 3 olarak ayarlanırsa RepeatColumns , denetimin RadioButtonList öğeleri üç öğeden oluşan satırlarda görüntülenir. Dokuz öğeli bir liste aşağıdaki gibi görünür.

Sütun 1 Sütun 2 Sütun 3
1 2 3
4 5 6
7 8 9

Şunlara uygulanır

Ayrıca bkz.