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

error when enable load on demand in a combo box

1 Answer 53 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mostafa
Top achievements
Rank 1
Mostafa asked on 25 Jul 2013, 06:50 PM
HI,
I have added a combo box to my page and then i wan to enable load on demand to load big number of records from my WCF service.
I'm getting an error when i click on the combo box: The server method 'MyMethod' failed.

here is my combo box html:

 

<telerik:RadComboBox ID="rcMyCombo" runat="server" CheckBoxes="True" EmptyMessage="Choose ...." Width="300px" DataTextField="Name" DataValueField="Id"                            

 

 

EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" >                       

 

 

<WebServiceSettings Path="http://localhost:8732/MyService.svc" Method="GetDataLoadOnDemand" />

 

</telerik:RadComboBox>


This is the method code in the WCF:

public RadComboBoxData GetTraderGroupsLoadOnDemand(RadComboBoxContext radComboContext)

{
// my implementation as in the documentation.
}

When i tried to debug the issue using IE debugger tool, i found this is the url that is being called from the web application is the following:
http://localhost:8732/MyService.svc/GetDataLoadOnDemand?context=%5B%7B%22Key%22%3A%22Text%22%2C%22Value%22%3A%22%22%7D%2C%7B%22Key%22%3A%22NumberOfItems%22%2C%22Value%22%3A0%7D%5D&callback=Sys._jsonp0

 

I'm using VS 2012 and the service is included in my solution so the wcf if not hosted in IIS but the development web server.

Waiting your help and support.

Appreciate it.


1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 31 Jul 2013, 07:22 AM
Hello Mostafa,

I noticed that you had configured the path to the web service as Path="http://localhost:8732/MyService.svc". Please consider using the approach, demonstrated in this documentation article. Instead of using the localhost, you should use the relative path in your project, as demonstrated in the article. In addition, I noticed that you had enabled the CheckBoxes functionality of the RadComboBox, which is a not supported scenario, when the LoadOnDemand mechanism is enabled.
This limitation is described in this article.

Regards,
Nencho
Telerik

If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ComboBox
Asked by
Mostafa
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or