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

Using CheckListWebServicePath not working

4 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christophe Bienaime
Top achievements
Rank 1
Christophe Bienaime asked on 28 Mar 2014, 01:59 PM
Hello,

I try to use the feature FilterType=CheckList of the radgrid. 

So I defined the CheckListWebServicePath property of the MasterTableView and the FilterCheckListWebServiceMethod (GetCities) of the GridBoundColumn. 
Problem is that I always get the same error when I click on the filter button : 
Server method failed : GetCities. 

So, I guess the link with the WCF service is not correct. Thing is I don't understand what to put exactly on the CheckListWebServicePath. Is it the link like "http://localhost:xxxx/MyService.svc" or a direct link like "..\..\MyService.svc" ? 

I tried everything (as shown in the online basic filtering example) but with no success. 
Note that if I call my GetCities method in the C# codebehind, it's working fine : 
MyServiceClient test = new MyService.MyServiceClient();
RadListBoxItemData[] lstTest = test.GetCities(new Dictionary<string, object>());

If needed, I can provide a project example. Thank you, JC






4 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 28 Mar 2014, 02:56 PM
Hi Christophe,

The path can be used in both ways, relative and absolute.

Have you registered the service into your web config?
For example:
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>       
<behavior name="NorthwindCustomersWcfServiceBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
<serviceBehaviors>
    <services>
      <service name="NorthwindCustomersWcfService">
        <endpoint address="" behaviorConfiguration="NorthwindCustomersWcfServiceBehavior" binding="webHttpBinding" contract="NorthwindCustomersWcfService" />
      </service>
    </services>

If you use Web Site, make sure your service is located into the App_Code folder.

Regards,
Vasil
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Christophe Bienaime
Top achievements
Rank 1
answered on 12 May 2014, 09:30 AM
Hi Vasil and thank you for your answer. 
Sorry for the late reply. 

Yes I registered my service into my web.config.
But I still dont understand how to make the link with the checklist path. 
I have a Web application so no App_Code folder. 

When I run Fiddler on the call of the filter in the radgrid, here is what happens : 

My web application is running on port 63320. In debug : http://localhost:63320/Default.aspx. 
MY service wcf is running on port 61320. In debug : http://localhost:61320/MyService.svc

When I call the filter, it tries to call this : http://localhost:63320/MyService.svc/GetCities
So it doesnt work because the service is on 61320, not 63320. 

I dont know how to link it to the right port. 

Thank you in advance,
Christophe
0
Christophe Bienaime
Top achievements
Rank 1
answered on 12 May 2014, 02:00 PM
FYI, I ended up using the RadGridStation_FilterCheckListItemsRequested event which works perfectly for my needs. 
Plus, I don't have to call a web service with this one. 
0
Vasil
Telerik team
answered on 15 May 2014, 11:18 AM
Hello Christophe,

I am happy that you have already resolved the issue, by using another approach.
I just tested the service with full url path, and it is working correct on my end, even if the service is on another machine with entirely different address.
Can not be sure what was the problem in your original site, but if you have the same problem in future, please let us know.

Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Christophe Bienaime
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Christophe Bienaime
Top achievements
Rank 1
Share this question
or