+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / RadioButtonLists are rendered as <ul>

RadioButtonLists are rendered as &lt;ul&gt;

7 posts, 1 answered
  1. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    05 Jan 2010
    Link to this post
    Hi,

    We are using 3.6 SP2
    We have problem with RadioButtonList rendering in our user control that is uploaded to Sitefinity.
    No matter what Repeatdirection / RepeatLayout we set Listitems are always rendered vertically as <ul>-<li>.
    It only happens inside Sitifinity pages. When we tested the control in aspx page (e.g different project ) it worked as expected.
    After some Research we came to know about this :
    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/control-designers.aspx
    As mentioned in this post it is due to control adpter provided for RadioButtonLists.
    We have tried to remove the line highlighted below and it worked:

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

    But we don't want to use this approach. Is there any other workaround for this ?
    Can we instruct Sitefinity that it should not apply controladpter for radiobuttonlist when it is in particular page or something like that ?
    How do we fix this by "styling the RadioButtonLists with custom CSS." as mentioned in the above post ? Please let us know sample style  for this if possible.

    Regards,
    Gaurav
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Jan 2010
    Link to this post
    Hello Gaurav Mehta,

    Thank you for using our services.

    You can assign a CssClass to your radio button list control and apply these styles to your theme. Lets say that we assign the control CssClass="ButtonList":
    .ButtonList
    {
        list-style-type:none;
        width: 100%;
        float: left;
        clear: both;
    }
    .ButtonList li
    {
        float: left;
        }

    This should do the trick.

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    05 Jan 2010
    Link to this post
    Hi Radoslav Georgiev,

    Thanks very much.
    It really helped.

    Regards,
    Gaurav
  4. Jay Mehta
    Jay Mehta avatar
    19 posts
    Registered:
    02 Sep 2009
    11 Nov 2010
    Link to this post
    Hi,

    I tried this solution and it worked for Firefox, but did not work for IE...Is there any specific reason? or I would have missed any change?

    Also, is there any kind of property which helps me disable the rabiobutton specific list items?

    I am using enabled = false, works on local, but not on sitefinity.

    Thank you,
    Jay Mehta.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Nov 2010
    Link to this post
    Hi Jay,

    I checked the behavior of the RadioButtonList control under IE8 and the list is ordered horizontally if you use the css provided in the post.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jay Mehta
    Jay Mehta avatar
    19 posts
    Registered:
    02 Sep 2009
    11 Nov 2010
    Link to this post
    Thanks Ivan for the reply,

    I re-tested that, but still it is not working properly with IE. I have IE-8 browser.

    Is there anything else I have to consider?

    Thank you,
    Jay Mehta.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Nov 2010
    Link to this post
    Hello Jay,

    I am not able to replicate this issue under IE 8 when the CssClass property of the RadioButtonList is set.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
7 posts, 1 answered