Use like a checklistbox

4 posts, 1 answers
  1. Tash
    Tash avatar
    15 posts
    Member since:
    Jul 2012

    Posted 15 May 2012 Link to this post

    Is there a way to use a radlistbox like a checklistbox with vertical checkboxes and not horrizonal. I am looking for checkbox controls for rad but dont see anything.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 May 2012 Link to this post

    Hi Tashfin,

    To enable CheckBoxes in RadListBox try setting CheckBoxes property of RadListBox.

    ASPX:
    <telerik:RadListBox ID="RadListBox1" runat="server" DataSourceID="SqlDataSource1" CheckBoxes="true" DataTextField="Text" DataValueField="Value" >
     </telerik:RadListBox>

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tash
    Tash avatar
    15 posts
    Member since:
    Jul 2012

    Posted 16 May 2012 Link to this post

    I get that. But can I arrange them horizontally and not vertically

    Option 1    Option 2    Option 3    Option 4    Option 5

    like that?

    This is what I tried.

    <

     

     

    telerik:RadListBox runat="server" CheckBoxes="true" DataSourceID="FF_DirectoryOffices"

     

     

     

    DataTextField="officeDescription" DataValueField="officeDescription" CssClass="horizontalListbox">

     

     

     

    </telerik:RadListBox>

     



    and in my css i added

    .horizontalListbox

     

     

    .rlbItem

     

    {

     

     

    float: left !important;

     

    }

    .horizontalListbox

     

     

    .rlbGroup, .RadListBox

     

    {

     

     

    width: auto !important;

     

    }



    Didnt work.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 May 2012 Link to this post

    Hi Tashfin,

    Try overriding the default css as follows to arrange RadListBoxItems horizontally.

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

    Hope this helps.

    Thanks,
    Princy.
Back to Top