Rad ListBox Alignment

6 posts, 0 answers
  1. brian
    brian avatar
    21 posts
    Member since:
    Aug 2010

    Posted 16 Sep 2010 Link to this post

    Is there a way to align the list item horizontally?

    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Sep 2010 Link to this post

    Hello Brian,

    You can add the following css in your page to allign all listbox items in Horizontal ditection.

    CSS:
    <style type="text/css">
            .rlbItem
            {
                float:left !important;
            }
            .rlbGroup, .RadListBox
            {
                width:auto !important;
            }
    </style>

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. brian
    brian avatar
    21 posts
    Member since:
    Aug 2010

    Posted 16 Sep 2010 Link to this post

    Thanks for your response. We tried but doesn't work. Could you provide a sample?

    Thanks again.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Sep 2010 Link to this post

    Hello Brian,


    Here is the code that I tried.

    Mark-up:
    <telerik:RadListBox Skin="Outlook" ID="RadListBox1" runat="server">
        <ButtonSettings TransferButtons="All"></ButtonSettings>
        <Items>
            <telerik:RadListBoxItem runat="server" Text="Item1" />
            <telerik:RadListBoxItem runat="server" Text="Item2" />
            <telerik:RadListBoxItem runat="server" Text="Item3" />
        </Items>
    </telerik:RadListBox>

    Style:
    <style type="text/css">
        .rlbItem
        {
            float: left !important;
        }
        .rlbGroup, .RadListBox
        {
            width: auto !important;
        }
    </style>

    Here I found the forum link which discussed similar scenario: How to allign items in horizontal direction inside listbox

    Could you provide the version of the control that you are trying, if this does not help?
    Is it happening for any specific browser?


    Thanks,
    Princy.
  6. vivek
    vivek avatar
    24 posts
    Member since:
    Oct 2010

    Posted 09 Nov 2010 Link to this post

    Hi Princy,

    I am populating data in RadListBox at runtime. Problem is the data into the RadListbox ia not left aligned. Could you please help me to align my data from the left. Currently it is center aligned. Is there any property to set. Please provide me sample.

    Thanx in advance
    Vivek
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Nov 2010 Link to this post

    Hello vivek,

    It seems that some styles on your pages overwrite RadListBox's style. Please send us a live url where the issue can be observed.

    Greetings,
    Yana
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017