RadComboBox Rendering with Templates

7 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 11 Mar 2009 Link to this post

    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.
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 11 Mar 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 11 Mar 2009 Link to this post

    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>
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 11 Mar 2009 Link to this post

    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.
  6. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 11 Mar 2009 Link to this post

    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.
  7. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 11 Mar 2009 Link to this post

    Correction, it is targeted as an UpdatedControl; so I guess that would be it, correct?

    Thanks.
  8. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 12 Mar 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017