Opening the dropdown fails to fire ItemsRequested while EnableLoadOnDemand is true...

4 posts, 0 answers
  1. Allen Smothers
    Allen Smothers avatar
    40 posts
    Member since:
    Nov 2006

    Posted 12 Nov 2009 Link to this post

    Hello,

    I'm having an issue with the Load-on-demand functionality of the RadComboBox.  I've set EnableLoadOnDemand="true" and have added OnItemsRequested="cbo1ItemsRequested" event.  The event gets fired if text is typed inside the dropdown box.  However, when I attempt to open the combobox via the arrow the event fails to fire and I'm left with an empty selection set.

    Here is a copy of my aspx code:
    <telerik:RadComboBox ID="cbo1" AutoPostBack="True" EnableViewState="False" Width="30em"    
       Font-Size="13px"  OnSelectedIndexChanged="cbo1_SelectedIndexChanged" 
       CausesValidation="false" OnPreRender="cbo1_PreRender" runat="server" Font-Bold="True" 
       HighlightTemplatedItems="True" MarkFirstMatch="true" EnableLoadOnDemand="true" OnItemsRequested="cbo1_ItemsRequested"
       <CollapseAnimation Duration="200" Type="OutQuint" /> 
          <ItemTemplate> 
             <table width="100%" cellpadding="0" cellspacing="0"
                <tr> 
                  <td> 
                     <asp:Label ID="lblName" Font-Size="larger" Font-Bold="true" runat="server" 
                        Text='<%# DataBinder.Eval(Container.DataItem, "EntityName") %>' /> 
                  </td> 
                  <td style="text-align: right"
                     <asp:Panel ID="pnlImage" runat="server"
                        <asp:Image ID="imgForward" runat="server" ImageUrl="../images/icons/forward.gif" /> 
                     </asp:Panel> 
                  </td> 
               </tr> 
           </table> 
       </ItemTemplate> 
    </telerik:RadComboBox> 

    Any ideas?

    Thanks,
    Allen
  2. Allen Smothers
    Allen Smothers avatar
    40 posts
    Member since:
    Nov 2006

    Posted 12 Nov 2009 Link to this post

    I've decide to forgo trying to use the EnableLoadOnDemand capabilities and instead try to load the dropdown when the user simply clicks on the dropdown's text or arrow.

    This is my current plan of attack that seems to be failing...

    I have a dropdown that I'm adding a single item and assigning on page load.  When the user click's on the dropdown I'm using an AjaxRequest to then populate the dropdown with the "On Demand" portion of the data.

    In the Page_Load event I'm doing this...
    RadAjaxManager ajaxProxy = RadAjaxManager.GetCurrent(Page); 
    ajaxProxy.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(ajaxProxy_AjaxRequest); 
     
    cboHEs.Attributes.Add("OnClick", RadAjaxManager.GetCurrent(Page).GetAjaxEventReference(cboHEs.ClientID)); 

    Then I'm attempting to do populate the dropdown in the AjaxRequest event...
    protected void ajaxProxy_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs evt) 
        if (evt.Argument == cboHEs.ClientID) 
            LoadHEs(); 

    Any ideas or suggestions?

    Thanks again,
    Allen

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Allen Smothers
    Allen Smothers avatar
    40 posts
    Member since:
    Nov 2006

    Posted 16 Nov 2009 Link to this post

    Any ideas?

    -Allen
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Nov 2009 Link to this post

    Hi Allen Smothers,

    We could not reproduce the original problem in our online demos. Can you? In all cases the items are loaded when the dropdown is opened. You can send us a sample project in a support ticket which demonstrates the issue. We will test it and find the reason.

    Greetings,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top