This is a migrated thread and some comments may be shown as answers.

Use like a checklistbox

3 Answers 99 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Tash
Top achievements
Rank 1
Tash asked on 15 May 2012, 10:30 PM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 16 May 2012, 05:27 AM
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.
0
Tash
Top achievements
Rank 1
answered on 16 May 2012, 03:49 PM
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.
0
Princy
Top achievements
Rank 2
answered on 17 May 2012, 05:29 AM
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.
Tags
ListBox
Asked by
Tash
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Tash
Top achievements
Rank 1
Share this question
or