6 Answers, 1 is accepted
0
Hello,
Plamen
Telerik
Yes, client templates are working properly with WCF and WebService binding too as for example it is shown in this help article.
Plamen
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.
0
Tarek
Top achievements
Rank 1
answered on 07 Nov 2013, 09:43 AM
Ok, it's working with Page Method and returning this json result :
{"d":[{"__type":"Telerik.Web.UI.SearchBoxItemData","Text":"","Value":"","DataItem":{"TYPE":"Account","CODE":"41|CRM_ACCOUNT|F","NAMEALPHA":"EASoft","EMAIL1":"mail@web.com","PHONE1":"1234"}}]}
but with WCF it's showing nothing because it's returning this format of json :
{"GetSearchListResult":[{"_dataItem":[{"Key":"TYPE","Value":"Account"},{"Key":"CODE","Value":"41|CRM_ACCOUNT|F"},{"Key":"NAMEALPHA","Value":"EASoft"},{"Key":"EMAIL1","Value":"mail@web.com"},{"Key":"PHONE1","Value":"1234"}],"_text":"","_value":""}]}
My WCF method is :
the same method is used in Page Method but without these headers :
{"d":[{"__type":"Telerik.Web.UI.SearchBoxItemData","Text":"","Value":"","DataItem":{"TYPE":"Account","CODE":"41|CRM_ACCOUNT|F","NAMEALPHA":"EASoft","EMAIL1":"mail@web.com","PHONE1":"1234"}}]}
but with WCF it's showing nothing because it's returning this format of json :
{"GetSearchListResult":[{"_dataItem":[{"Key":"TYPE","Value":"Account"},{"Key":"CODE","Value":"41|CRM_ACCOUNT|F"},{"Key":"NAMEALPHA","Value":"EASoft"},{"Key":"EMAIL1","Value":"mail@web.com"},{"Key":"PHONE1","Value":"1234"}],"_text":"","_value":""}]}
My WCF method is :
[OperationContract]
[WebInvoke(Method =
"POST"
, BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
SearchBoxItemData[] GetSearchList(SearchBoxContext context);
the same method is used in Page Method but without these headers :
[WebInvoke(Method =
"POST"
, BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
so I think here is the issue in formatting the Response
0
Hi,
Plamen
Telerik
I am attaching a sample web page where is implemented how we recommend you achieve such scenario with RadSearchBox that is bound to WCF.
Hope this will be helpful.
Plamen
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.
0
Tarek
Top achievements
Rank 1
answered on 14 Nov 2013, 05:13 PM
Dear Plamen, this sample project is not working . It's returning a result in the attachment below
0
Accepted
Hi,
Plamen
Telerik
It looks that there is something different in the way the project is tested or in the environment because it worked correctly at my side. Here is a video of my test. Please review it and let me know what else should I do or add to observe the unusual issue described and be able to inspect it and be more helpful in solving it.
Plamen
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.
0
Tarek
Top achievements
Rank 1
answered on 23 Nov 2013, 12:43 PM
Dear Plamen, you are right this issue was caused in version 2013 Q1, after upgrading to Q3 the demo worked well .
Thank you
Thank you