Good afternoon,
I am trying to connect a RadClientDataSource to a web Service but it is not getting called (I know because i am tracing the sql database that it uses and I have tried with breakpoints). At present the code is:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageSingleMenu.Master" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Grid" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="styles/grid.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
<telerik:RadGrid RenderMode="Lightweight" ID="dgSessions" runat="server" AutoGenerateColumns="false" AllowSorting="true"
EnableHeaderContextMenu="true" ClientDataSourceID="RadClientDataSource1"
AllowMultiRowSelection="false" >
<MasterTableView Width="100%" ClientDataKeyNames="SessionKey" DataKeyNames="SessionKey" CommandItemDisplay="None">
<Columns>
<telerik:GridBoundColumn UniqueName="HorseName" HeaderText="Horse" DataField="HorseName" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="BT200" HeaderText="BT200" DataField="BT200" ReadOnly="True">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server">
<DataSource>
<WebServiceDataSourceSettings ServiceType="OData" >
<Select Url="http://localhost:49833/ETSession.svc/GetSessions" DataType="JSON" />
</WebServiceDataSourceSettings>
</DataSource>
<Schema>
<Model ID="SessionKey">
<telerik:ClientDataSourceModelField FieldName="SessionKey" />
<telerik:ClientDataSourceModelField FieldName="HorseName" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="BT200" />
</Model>
</Schema>
</telerik:RadClientDataSource>
</asp:Content>
I have tried with a remote web service, also with the web service code file in the same project as the page, but to no avail.
I have also tried the follwing snippet:
<WebServiceDataSourceSettings ServiceType="OData" BaseUrl="http://localhost:49833/ETSession.svc/" >
<Select Url="GetSessions" DataType="JSON" />
</WebServiceDataSourceSettings>
This results in GetSessions giving a Not Found indicator (green squigly line under the name) - that occurs in all three scenarios (remote, local or in-place).
The service works as i have tested it from another project.
Using VS2010 and .Net 4
Would welcome any thoughts.
Mary