RadioButtonList.CellSpacing Property
Gets or sets the distance (in pixels) between adjacent table cells.
[Visual Basic] Public Overridable Property CellSpacing As Integer [C#] public virtual int CellSpacing {get; set;} [C++] public: __property virtual int get_CellSpacing(); public: __property virtual void set_CellSpacing(int); [JScript] public function get CellSpacing() : int; public function set CellSpacing(int);
Property Value
The distance (in pixels) between adjacent table cells. The default is -1, which indicates that this property is not set.
Remarks
This property only applies when the RepeatLayout property is set to RepeatLayout.Table.
Use this property to control the spacing between individual cells in the table. This property is applied both vertically and horizontally.
Example
[Visual Basic, C#, JScript] The following example demonstrates how to use the CellSpacing property to space the cells of a RadioButtonList apart by 10 pixels.
[Visual Basic] <%@ Page Language="VB" AutoEventWireup="True" %> <asp:RadioButtonList id=RadioButtonList1 RepeatLayout = "Table" CellSpacing = "10" 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> [C#] <%@ Page Language="C#" AutoEventWireup="True" %> <asp:RadioButtonList id=RadioButtonList1 RepeatLayout = "Table" CellSpacing = "10" 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> [JScript] <%@ Page Language="JScript" AutoEventWireup="True" %> <asp:RadioButtonList id=RadioButtonList1 RepeatLayout = "Table" CellSpacing = "10" 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>
[C++] No example is available for C++. To view a Visual Basic, C#, or JScript example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
RadioButtonList Class | RadioButtonList Members | System.Web.UI.WebControls Namespace | CellPadding