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

DropDownWidth vs CheckBoxList line breaks

3 Answers 185 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
bobobio
Top achievements
Rank 1
bobobio asked on 25 Apr 2008, 04:29 PM
Hi,

I have a CheckBoxList control within a RadComboBox. The code in my aspx is as follows:

<

radC:RadComboBox ID="NursingStatusRCB" runat="server" Width="185px" Height="100%" Skin="WebBlue">
<Items>
   <radC:RadComboBoxItem runat="server" Text="Status (APN, RN, etc.)" />
</Items>
<ItemTemplate>
<div onclick="stopPropagation(event);">
<asp:CheckBoxList ID="NursingStatusCBL" runat="server" CssClass="field_box" BorderStyle="None"></asp:CheckBoxList>
</div>
</ItemTemplate>
</radC:RadComboBox>

In my code behind, I bind a datatable to the checkboxlist.
When the text associated with a checkbox is wider than that provided by the dropdown, it breaks onto a new line. The second line of text is aligned underneath the checkbox. The problem is that this doesn't look good at all, so we want to have the second line of text line up with the first line of text. Can anyone offer help on how to have the text line up with itself in this manner?

Alternatively, we could adjust the width of the DropDown of the radComboBox (using DropDownWidth) to allow enough room for the text so it doesn't break onto 2 lines. The problem we face there though is that the data populating the CheckBoxList comes from our DB, so at design time, we don't know what the width of the box needs to be. I tried setting this value as 100%, but it gets interpreted as 100px.

Thanks for any assistance you can provide.
Karl

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 28 Apr 2008, 10:53 AM
Hello Karl,

I noticed that you have posted the same question in ticket #134518. I have already answered there. That is why I am closing this ticket.

Having other questions - do not hesitate to contact us again.

Regards,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
saravanakumar
Top achievements
Rank 1
answered on 16 May 2011, 06:35 PM
I  am having checkbox list .One of the checkboxes having more charcters.In that time the line will break,so in that situation the second line should start where the first line charcter starts.Please any one help for this
0
Kate
Telerik team
answered on 19 May 2011, 12:50 PM
Hi saravanakumar,

Can you please specify which of the Telerik controls do you refer to since we do not have a checkbox list.?

Best wishes,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ComboBox
Asked by
bobobio
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
saravanakumar
Top achievements
Rank 1
Kate
Telerik team
Share this question
or