Both DataSource and DataSourceID are defined on 'RadScheduler".

2 posts, 0 answers
  1. Adigard
    Adigard avatar
    61 posts
    Member since:
    Oct 2011

    Posted 04 Oct 2011 Link to this post


    i've been trying to use RadScheduler for a few hours and i have already a problem.
    Got this error "Both DataSource and DataSourceID are defined on 'RadScheduler".

    I don't understand why since i haven't defined a datasource anywhere. Just DataSourceID trying to set a DataSource.
    All my code was so far generated automatically

    This is what i have:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadSchedulerWebForm.aspx.cs" Inherits="RadSchedulerWebForm" %>

    <%@ Register src="RadSchedulerWebFormAdvancedForm.ascx" tagname="AdvancedForm" tagprefix="uc1" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

    <html xmlns="">
    <head runat="server">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        <script type="text/javascript">
            //Put your Java Script code here.
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
        <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Forest">
            <telerik:RadScheduler runat="server" ID="RadScheduler1"
                DataKeyField="idRDV" DataSubjectField="objet" DataStartField="debut" DataEndField="duree"
                DataRecurrenceField="objet" DataRecurrenceParentKeyField="objet"
                StartInsertingInAdvancedForm="True" DataDescriptionField="description"

                <uc1:AdvancedForm    runat="server" ID="AdvancedEditForm"
                                            Subject='<%# Bind("Subject") %>'
                                            Start='<%# Bind("Start") %>'
                                            End='<%# Bind("End") %>'/>
                   <div style="text-align: right">
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update"/>
                        <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"/>
                <uc1:AdvancedForm    runat="server" ID="AdvancedInsertForm"
                                            Subject='<%# Bind("Subject") %>'
                                            Start='<%# Bind("Start") %>'
                                            End='<%# Bind("End") %>'/>
                    <div style="text-align: right">
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert"/>
                        <asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"/>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:IntranetConnectionString %>"
                SelectCommand="SELECT [objet], [debut], [duree], [heure], [description], [lieu], [idRDV] FROM [rendezvous]">

    thank you in advance for you help
  2. Plamen
    Plamen avatar
    3079 posts

    Posted 07 Oct 2011 Link to this post

    Hello Rambert,

    I tested your code, but could not reproduce the issue. It seems the error is not caused by the RadScheduler. Here is an interesting article about it.

    I am sending you a working project with a SqlDataSource, without the advanced Templates.

    Hope this will be helpful.

    All the best,
    Plamen Zdravkov
    the Telerik team
    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 their blog feed now
Back to Top