This question is locked. New answers and comments are not allowed.
I am trying to use an external web service that returns a JSON string to populate my ComboBox.
How can I map the fields in the JSON string to the required ComboBox fields?
The JSON string returns pairs of CODE and DESCRIPTION...
Here is my code:
in my ASPX file:
<% Html.Telerik().ComboBox()
.Name("cbRefTables")
.DataBinding(b => b
.Ajax()
.Select("_GetCALMdata", "Common")
)
.Render();
%>
in my Controller file:
public ContentResult _GetCALMdata(string text)
{
CALMwsP.wsCALMSoapClient wsC = new CALMwsP.wsCALMSoapClient("wsCALMSoap");
string resultset = wsC.GetRefTables("MyUserID", "MyDB", "MyWorkstation", "MyApp");
return Content(resultset, "application/json");
}
public ActionResult Index()
{
return View();
}
Also how can I specify the empty Message string?
OS: XP
Telerik Version: ASPNET_MVC_2011_1_315_OpenSource
Language: C#
Visual Studio 2010 Professional Version 10.0.30319.1
,Net Framework: Version 4.0.30319
Browser: Firefox 4.0.1
How can I map the fields in the JSON string to the required ComboBox fields?
The JSON string returns pairs of CODE and DESCRIPTION...
Here is my code:
in my ASPX file:
<% Html.Telerik().ComboBox()
.Name("cbRefTables")
.DataBinding(b => b
.Ajax()
.Select("_GetCALMdata", "Common")
)
.Render();
%>
in my Controller file:
public ContentResult _GetCALMdata(string text)
{
CALMwsP.wsCALMSoapClient wsC = new CALMwsP.wsCALMSoapClient("wsCALMSoap");
string resultset = wsC.GetRefTables("MyUserID", "MyDB", "MyWorkstation", "MyApp");
return Content(resultset, "application/json");
}
public ActionResult Index()
{
return View();
}
Also how can I specify the empty Message string?
OS: XP
Telerik Version: ASPNET_MVC_2011_1_315_OpenSource
Language: C#
Visual Studio 2010 Professional Version 10.0.30319.1
,Net Framework: Version 4.0.30319
Browser: Firefox 4.0.1