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

RadComboBox Rendering with Templates

6 Answers 156 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 11 Mar 2009, 04:44 PM
Hello,

I have a RadComboBox that uses the ItemTemplate property to represent bound items in a table.  For whatever reason, in the HTML, it renders a surrounding <div> with style="display:block"; I actually need style="display:inline".  Is there a way to change this?

Thanks.

6 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 11 Mar 2009, 05:22 PM
Hi Brian Mains,

RadComboBox does renders on the HTML which the Template controls render - it does not render any additional HTML. You could observe this in this live demo as well.

Could you please elaborate more on your case? What Template definition are you using? Where is this <div> rendered? Could you provide a screenshot of the HTML DOM tree around this element?

Kind regards,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brian Mains
Top achievements
Rank 1
answered on 11 Mar 2009, 05:38 PM
Hey,

I'm using this for the rad combo:

<t:RadComboBox .. HighlightTemplatedItems="True" DropDownWidth="150px">
    <HeaderTemplate>Header</HeaderTemplate>
    <ItemTemplate>
          <asp:Label .. />
          <asp:Label .. />
          <asp:HiddenField .. />
          <asp:HiddenField .. />
    </ItemTemplate>
</t:RadComboBox>

When it renders, there is:

   <!-- incorrect setting here; this is not my panel or div element, and it defaults to block.  I use script to change to inline. -->
<div id="ctl100_ContentPlaceholder_MyComboPanel" style="display:block">
   <!-- for combo; class is correct and does not define display="block" -->
<div id="ctl100_ContentPlaceholder_MyCombo" class="RadComboBox RadComboBox_Default" style="width:160px;display -moz-inline-stack">

Let me know if this is a bug and I can submit a ticket.  Is it configurable at all?  I want display:inline to be the default, and not have to use script.  I don' tknow where this panel element comes from.

Thanks.
</div>
</div>
0
Atanas Korchev
Telerik team
answered on 11 Mar 2009, 05:59 PM
Hello Brian,

Those are the update panels rendered by RadAjaxManager. To make them inline you can do the following:

<telerik:RadAjaxManager UpdatePanelsRenderMode="Inline"></telerik:RadAjaxManager>

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brian Mains
Top achievements
Rank 1
answered on 11 Mar 2009, 06:24 PM
Hey,

MyCombo isn't targeted by the AJAXSettings in the RadAjaxManager, nor is it wrapped with a RadAjaxPanel... so you are saying that the RadComboBox wraps itself with a RadAjaxPanel, or that the RadAjaxManager is targeting the combo?

A little more detail would be helpful, thanks.
0
Brian Mains
Top achievements
Rank 1
answered on 11 Mar 2009, 06:25 PM
Correction, it is targeted as an UpdatedControl; so I guess that would be it, correct?

Thanks.
0
Simon
Telerik team
answered on 12 Mar 2009, 08:58 AM
Hi Brian Mains,

Yes, as a target control, the ComboBox is wrapped inside the <div> element in question, so you could use the solution suggested by Albert.

Kind regards,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ComboBox
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Simon
Telerik team
Brian Mains
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or