Sitefinity ASP.NET CMS
Skip Navigation LinksSupport / Knowledge Base / RadioButtonList rendered as <ul>

RadioButtonList rendered as <ul>

When you use RadioButtonList control in your Sitefinity website the button lists are always rendered as <ul> and setting the ReperatDirection="Horizontal" property of the RadioButtonList control does not take effect. This is because we use a custom control adapter fro rendering the control in Sitefinity.

 

In order to make the RadioButtonList control render the buttons horizontally you have two options: either remove the control adapter or provide custom styles for the RadioButtonList. The first option is not recommendable because removing the control adapter will break the appearance of RadioButton controls in the Sitefnity back-end. This can be done by removing the bellow line from ~/App_Browsers/BrowserFile.browser file:

    <controlAdapters> 
      ... 
      <adapter controlType="System.Web.UI.WebControls.RadioButtonList" adapterType="Telerik.Cms.Web.UI.Adapters.RadioButtonListAdapter" /> 
    </controlAdapters> 

The preferred approach is to provide CSS rules in order to render the radio button lists on the same line. First set the CssClass property of the RadioButtonList control:

    <asp:RadioButtonList ID="RadioButtonList1" runat="server" CssClass="ButtonList"
        ... 
    </asp:RadioButtonList> 

Then use the bellow sample CSS rules to achieve the desired result:

.ButtonList 
    list-style-type:none
    width: 100%; 
    floatleft
    clearboth
.ButtonList li 
    floatleft
 

Article Info

Article relates to 3.x
Created by Radoslav Georgiev
Last modified by
Related categories: Appearance

About Telerik

Telerik, the publisher of Sitefinity CMS, is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting and .NET ORMTFSCode Analysis and Web Application Testing tools. Building on its solid expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Created with passion, Telerik products help thousands of developers every day to be more productive and deliver reliable applications under budget and on time. Read more about Telerik

Copyright © 2002-2010 Telerik. All rights reserved. Powered by Sitefinity