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

[Solved] Client DataBind and WCF Service Application

2 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Henrique Duarte
Top achievements
Rank 1
Veteran
Henrique Duarte asked on 04 Mar 2010, 08:15 PM
Hello,

I'm trying to populate a RadGrid using client databind accessing a wcf service hosted on a second project. Is it possible?
I searched at online demos, but I couldn't find anyone with this scenario.

Best regards,

Henrique 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Mar 2010, 04:47 AM
Hello Henrique,

If you want to use declarative client-side data-binding, then refer the example RadGrid bound to WCF Web Service. RadGrid does post request to your service and parse result from it.

Other option is to try manually binding RadGrid as demonstrated on the following blog post:
RadGrid for ASP.NET AJAX client-side data-binding to WCF 


Hope this helps,
-Shinu.
0
Henrique Duarte
Top achievements
Rank 1
Veteran
answered on 06 Mar 2010, 03:23 PM
Shinu,

Thank you, but that's not the scenario.
I want to access an AJAX-enabled WCF service hosted on a second project (ex: WCF Application Service).
According to this post, I cannot do this because a security constrain imposed by the browser:

"You won’t be able to access the service in the other project, this is because you can’t make cross-domain calls using XMLHttpRequest, this is a security constrain imposed by the browsers not AJAX, note that here we are talking about application domains, not internet domains, you can face this even in the same machine, one way to avoid this is the use of a “bridge service”: you create a WCF under your application´s project, the client will call this local service which in turn will call the external WCF service and return the result to the client, since the call to the external WCF service is made in the server you won’t face a cross-domain error."

Can anybody confirms that?

Best regards,

Henrique
Tags
Grid
Asked by
Henrique Duarte
Top achievements
Rank 1
Veteran
Answers by
Shinu
Top achievements
Rank 2
Henrique Duarte
Top achievements
Rank 1
Veteran
Share this question
or