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

ListBox Item Width

1 Answer 176 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Farooq
Top achievements
Rank 1
Farooq asked on 07 Nov 2012, 08:44 PM
I have a radlistbox and the items are being inserted programmatically, how do I expand the width of an item so multiple items won't show on a single line as they are showing as of now.

currently items are being inserted to listbox in c# like :
rlbAssigned.Items.Add(new RadListBoxItem(rlbAvailable.Items[rlbAvailable.SelectedIndex].Text, rlbAvailable.Items[rlbAvailable.SelectedIndex].Value));

and the listbox is declared as:
<telerik:RadListBox ID="rlbAvailable" runat="server" Height="320px" Width="200px">                                         </telerik:RadListBox>

1 Answer, 1 is accepted

Sort by
0
Farooq
Top achievements
Rank 1
answered on 07 Nov 2012, 09:14 PM
I figured it out since it has Ul and li I resolved it using css like so:   
.RadListBox ul li      
   {
     float: left !important;     
     width: 170px;
   }

I would be glad if someone comes up with a another solution.

Tags
ListBox
Asked by
Farooq
Top achievements
Rank 1
Answers by
Farooq
Top achievements
Rank 1
Share this question
or