New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Multiple Columns

  • Demo Configurator
Level 0
  • Spin UpSpin Down
  • Repeat direction
  • Alignment
Level 1
  • Spin UpSpin Down
  • Repeat direction
  • Alignment

The following properties can be used to customize the List Layout mode: RepeatColumns, RepeatDirection and RowAlign

The RepeatDirection property determines the order in which the nodes in the level are rendered.

If this property is set to RepeatDirection.Vertical, the nodes in the level are displayed in columns loaded from top to bottom, then left to right, until all nodes are rendered.

If this property is set to RepeatDirection.Horizontal, the nodes in the level are displayed in rows loaded from left to right, then top to bottom, until all nodes are rendered.

The RepeatDirection has no effect if RepeatColumns is set to 0 (default).

The RepeatColumns property specifies the number of columns for the given level.

Setting the RowAlign property to "true" forces the nodes in different columns to align to each other, as if they were rendered in a table.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="SiteMap.Examples.MultiColumns.DefaultVB" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadSiteMapDataSource runat="server" ID="RadSiteMapDataSource1" ShowStartingNode="false"
        SiteMapFile="~/Examples.sitemap"></telerik:RadSiteMapDataSource>

    <div class="demo-container">
        <telerik:RadSiteMap runat="server" ID="SiteMap1" DataSourceID="RadSiteMapDataSource1"
            MaxDataBindDepth="2">
            <LevelSettings>
                <%-- Settings are initialized from the code-behind --%>
                <telerik:SiteMapLevelSetting>
                </telerik:SiteMapLevelSetting>
                <telerik:SiteMapLevelSetting>
                </telerik:SiteMapLevelSetting>
            </LevelSettings>
        </telerik:RadSiteMap>
    </div>

     <qsf:ConfiguratorPanel ID="ConfiguratorPanel1" runat="server">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Title="Level 0" Size="Narrow">
                    <ul class="fb-group">
                        <li>
                            <qsf:NumericTextBox runat="server" ID="TBRepeatColumns" MinValue="0" MaxValue="3"
                                Value="2" ShowSpinButtons="true" AutoPostBack="true" Label="Number of columns">
                                <NumberFormat DecimalDigits="0"></NumberFormat>
                            </qsf:NumericTextBox>
                        </li>
                        <li>
                            <span class="label">Repeat direction</span>
                            <qsf:RadioButtonList ID="RBLDirection" runat="server" AutoPostBack="true" Orientation="Horizontal">
                                <asp:ListItem Value="Vertical" Selected="True"></asp:ListItem>
                                <asp:ListItem Value="Horizontal"></asp:ListItem>
                            </qsf:RadioButtonList>
                        </li>
                        <li>
                            <span class="label">Alignment</span>
                            <qsf:RadioButtonList ID="RBLAlingment" runat="server" AutoPostBack="true" Orientation="Horizontal">
                                <asp:ListItem Value="List" Selected="True"></asp:ListItem>
                                <asp:ListItem Value="Table-like"></asp:ListItem>
                            </qsf:RadioButtonList>
                        </li>
                    </ul>
                </qsf:ConfiguratorColumn>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" runat="server" Title="Level 1" Size="Narrow">
                    <ul class="fb-group">
                        <li>
                            <qsf:NumericTextBox runat="server" ID="TBRepeatColumnsLvl2" MinValue="0" MaxValue="3"
                                Value="3" ShowSpinButtons="true" AutoPostBack="true" Label="Number of columns">
                                <NumberFormat DecimalDigits="0"></NumberFormat>
                            </qsf:NumericTextBox>
                        </li>
                        <li>
                            <span class="label">Repeat direction</span>
                            <qsf:RadioButtonList ID="RBLDirectionLvl2" runat="server" AutoPostBack="true" Orientation="Horizontal">
                                <asp:ListItem Value="Vertical" Selected="True"></asp:ListItem>
                                <asp:ListItem Value="Horizontal"></asp:ListItem>
                            </qsf:RadioButtonList>
                        </li>
                        <li>
                            <span class="label">Alignment</span>
                            <qsf:RadioButtonList ID="RBLAlingmentLvl2" runat="server" AutoPostBack="true" Orientation="Horizontal">
                                <asp:ListItem Value="List" Selected="True"></asp:ListItem>
                                <asp:ListItem Value="Table-like"></asp:ListItem>
                            </qsf:RadioButtonList>
                        </li>
                    </ul>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
     </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance