On Load Demand ComboBox Error

2 posts, 0 answers
  1. Samit
    Samit avatar
    1 posts
    Member since:
    Jun 2011

    Posted 02 Jun 2011 Link to this post

    Hi,

    I am trying to implement the automatic onloaddemand mechanism of the RAD combo box. But getting following error when click on dropdown:-


    "The result of query can not be enumerated more than once"

    Following is the source html for location combo box. Combobox is bind to objectdata source. Highlighted portion is use for  onload demand functionality.

    <telerik:RadComboBox ID="comboLocation" runat="server" Width="250px" DataTextField="Location_DisplayName"

                         DataValueField="Location_ID" DataSourceID="LocationDataSource"

                         AppendDataBoundItems="true" EnableAutomaticLoadOnDemand="true"

                         onitemsrequested="comboLocation_ItemsRequested" ShowMoreResultsBox="true"                 
                         itemsperrequest
    ="5" enablevirtualscrolling="true">

                        <Items>

                           <telerik:RadComboBoxItem Text="" />

                        </Items>
    </telerik:RadComboBox>

     

    Not able to find what is happening wrong to cause above error. Have anyone got the same issue while developoing combobox on load demand functionality.

  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 06 Jun 2011 Link to this post

    Hi Samit,

    In case you want to use Automatic Load On Demand you should set a data source id for the DataSourceID property of the RadComboBox.

    If you want to use the ItemsRequested event, then you shouldn't use Automatic Load On Demand, but supply the items to be loaded in the event handler function.

    Please refer to the following demo and help article, regarding the usage of Automatic Load On Demand.

    I hope this would help you out.

    Best wishes,
    Dimitar Terziev
    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.

Back to Top