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

Change Web Service method client side?

5 Answers 110 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Schmidty
Top achievements
Rank 2
Schmidty asked on 15 May 2010, 05:41 AM
I am looking to change the web service method via a client side, and was wondering if there is a way to do it. I could not find one myself.

The context I am using it in is alongside a dropdownlist. The combobox searches for records based on the type selected in the dropdownlist. I change the method for when the list changes. I am trying to reduce my server side calls, and would love to be able to handle all this clientside.


5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 20 May 2010, 01:43 PM
Hello Schmidty,

You can change the name of the Web Method (or the Web Service path) in the following way:
var webServiceSettings = comboBox.get_webServiceSettings();
webServiceSettings.set_method("MethodName");
//webServiceSettings.set_path("WebServicePath");

Kind regards,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Eric Routhier
Top achievements
Rank 1
answered on 14 Jul 2010, 04:11 PM
Hi,

Say I want to have a multi-column RadComboBox AND I want to use the virtual scrolling option.

In that case, the WCF service would need to return a RadComboBoxData object instead of an IList<T>. How can I bind my data to the template in that case ? (Of course, I want everything to be client-side).

Thank you,

Eric   
0
Simon
Telerik team
answered on 14 Jul 2010, 04:22 PM
Hi Eric Routhier,

Achieving this would require a client-side template mechanism, which unfortunately MS dropped right before the official release of ASP.NET 4.0. Luckily you can use a version of the mechanism from one of the Previews as described in this blog post.

Until there is an official Template Engine this would be a possible solution. 

I hope it helps.

Kind regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eric Routhier
Top achievements
Rank 1
answered on 14 Jul 2010, 04:32 PM
Thank you for your fast reply Simon,

I implemented the mecanism in this preview and it works great for multi-column.

However as I said there are limitations. Since the webservice in this particular mecanism returns an IList<> instead of a RadComboBoxData, I cannot implement virtual scrolling correctly.

Normally I set the EndOfItems property in the webservice and return the RadComboBoxData object to the control. Without setting the EndOfItems property, the scrolling never seems to reach the end.

Is there a solution for this particular issue regarding virtual scrolling ?

Thank you,

Eric  
0
Simon
Telerik team
answered on 19 Jul 2010, 11:43 AM
Hello Eric Routhier,

Although the example in the blog post uses an IList<> to return the data you can as well use RadComboBoxData in the same way (as in this demo).

I hope this helps.

Best wishes,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Schmidty
Top achievements
Rank 2
Answers by
Simon
Telerik team
Eric Routhier
Top achievements
Rank 1
Share this question
or