RadScheduler - CANNOT GET TO WORK

4 posts, 0 answers
  1. NA
    NA avatar
    2 posts
    Member since:
    Jun 2011

    Posted 07 Jun 2011 Link to this post

    I am currently tieing the RadScheduler to a datasource but once I have it up, I cannot seem to do an insert. Nothing happens.
    As such, I cannot see how the delete and update work. Below is what I have for the .aspx file:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadScheduler.aspx.cs"  %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
      
        protected void Button1_Click(object sender, EventArgs e)
        {
      
        }
    </script>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
          
        </div>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
          
        <telerik:RadScheduler ID="RadScheduler1" runat="server" 
            DataEndField="DataEndField" DataKeyField="DataKeyField" 
            DataSourceID="SqlDataSource3" DataStartField="DataStartField" 
            DataSubjectField="DataSubjectField">
        </telerik:RadScheduler>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Scheduler %>" 
            SelectCommand="SELECT [DataKeyField], [DataSubjectField], [DataStartField], [DataEndField] FROM [Sched]">
        </asp:SqlDataSource>
        <br />
        </form>
    </body>
    </html>


    Below is my aspx.cs file content:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Collections;
    using System.Linq;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
    using System.Data;
    using System.Web.UI.HtmlControls;
      
       
      
    namespace AjaxRND
    {
        public partial class RadScheduler : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                   
            }
        }
    }

    Thank you in advance


     

     

  2. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 07 Jun 2011 Link to this post

    Have you tried adding an Ajax Manager like the following:
    <telerik:RadAjaxManager runat="Server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Regards,
    Dan
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NA
    NA avatar
    2 posts
    Member since:
    Jun 2011

    Posted 08 Jun 2011 Link to this post

    Dan,
    Thanks for your reply.
    I have the following but when I insert a new appointment, it will not stick. I made the following change in the RadScheduler.aspx file:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadScheduler.aspx.cs"  %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
      
        protected void Button1_Click(object sender, EventArgs e)
        {
      
        }
    </script>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
          
        </div>
      
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"
        </telerik:RadScriptManager
      
    <telerik:RadAjaxManager runat="Server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
      
          
        <telerik:RadScheduler ID="RadScheduler1" runat="server" 
            DataEndField="DataEndField" DataKeyField="DataKeyField" 
            DataSourceID="SqlDataSource3" DataStartField="DataStartField" 
            DataSubjectField="DataSubjectField">
        </telerik:RadScheduler>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Scheduler %>" 
            SelectCommand="SELECT [DataKeyField], [DataSubjectField], [DataStartField], [DataEndField] FROM [Sched]">
        </asp:SqlDataSource>
        <br />
        </form>
    </body>
    </html>

    Thanks
  5. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 08 Jun 2011 Link to this post

    I think I was pointing you in the wrong direction and you can probably remove the AjaxManager. After reading your posts again I think you need to define an InsertCommand and UpdateCommand and perhaps more. Take a look here: http://demos.telerik.com/aspnet-ajax/scheduler/examples/templates/defaultcs.aspx

    (search for 'InsertCommand')

    Hope you get it working.
    Dan
Back to Top