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

On Load Demand ComboBox Error

1 Answer 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Samit
Top achievements
Rank 1
Samit asked on 02 Jun 2011, 01:35 PM

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.

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 06 Jun 2011, 03:29 PM
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.

Tags
ComboBox
Asked by
Samit
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or