<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="webbetv1.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <html runat="server"> <head > <style type="text/css"> .RadSplitter .pane, .RadSplitter .paneHorizontal { border: 0px !important; padding: 0px !important;} .style1 { width: 100%; margin-bottom: 33px; } </style> <script type="text/javascript"> //Put your JavaScript code here. </script> </head> <form id="Form1" runat="server"> <body> <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"></telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <div style="height:800px; width: auto;"> <telerik:RadSplitter ID="MainSplitter" runat="server" Width="100%" Height="100%" ExpandMode="FullExpandItem" Orientation="Horizontal" LiveResize="false" BorderSize="0" BorderWidth="0px" BorderStyle="None" CssClass="pane" > <telerik:RadPane ID="TopPane" runat="server" Height="120" MinHeight="85" MaxHeight="150" BorderWidth="0px" Scrolling="none" CssClass="pane" > <asp:PlaceHolder ID="PlaceHolder3" runat="server"></asp:PlaceHolder> <table class="style1"> <tr> <td> </td> <td> </td> </tr> <tr> <td> sadasd</td> <td> </td> </tr> </table> </telerik:RadPane> <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" Height="100%" BorderWidth="0px" BorderStyle="None" /> </telerik:RadSplitter> </div> </body> </form> </html><!-- edited from sample, aspx simplifies to this: --><telerik:RadComboBox ID="RadComboBox1" runat="server" > <ItemTemplate> <telerik:RadGrid ID="RadGrid1" runat="server">... </telerik:RadGrid> </ItemTemplate></telerik:RadComboBox>protected void Page_Init(object sender, EventArgs e){ //create basic grid RadGrid grid = new RadGrid(); grid.ID = "RadGrid1"; grid.NeedDataSource += RadGrid1_NeedDataSource; grid.AllowSorting = true; grid.MasterTableView.AutoGenerateColumns = true; //try mimic aspx page implementation... not possible because of Type mismatch RadComboBox1.ItemTemplate = grid;}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>
