I am attempting to create a web service using the signature found in your example:
[ScriptService]
public class WebServiceName : WebService
{
[WebMethod]
public RadComboBoxItemData[] WebServiceMethodName(object context)
{
// We cannot use a dictionary as a parameter, because it is only supported by script services.
// The context object should be cast to a dictionary at runtime.
IDictionary<string, object> contextDictionary = (IDictionary<string, object>) context;
//...
}
}
As I understand it, the web service must return a RadComboBoxItemData array. However, when creating a web service using the above signature, I get an error saying the RadComboBoxItemData implements IDictionary and therefore can not be serialized. I'm sure I'm doing something wrong - but can't figure it out.
I even took your sample code and compiled and got the same error!
Regards,
Ken
-- The javascript
uxRadGrid_MasterTable_row.get_cell("ContactId").innerText
-- the column def
<
telerik:GridTemplateColumn
DataField
=
"ContactId"
HeaderText
=
"Contact"
UniqueName
=
"ContactId"
>
<
ItemTemplate
><%# Eval("Name")%></
ItemTemplate
>
<
EditItemTemplate
>
<
span
>
<
telerik:RadComboBox
ID
=
"uxContactId"
Runat
=
"server"
.....></
telerik:RadComboBox
>
</
span
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
Parameter count mismatch.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Reflection.TargetParameterCountException: Parameter count mismatch.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TargetParameterCountException: Parameter count mismatch.]
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +9353950
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
Telerik.WebControls.RadGrid.x61efa10fcd646105() +178
Telerik.WebControls.RadGrid.OnPreRender(EventArgs e) +728
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1022