RadScheduler delete appointment not working -Using Scheduler - Resource Grouping demo version

3 posts, 0 answers
  1. aakash
    aakash avatar
    7 posts
    Member since:
    Feb 2018

    Posted 05 Mar Link to this post

    here is my aspx page 

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

    <%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">

        <title></title>

     
        <script src="lib/qsf.js"></script>
        <link href="lib/qsf.css" rel="stylesheet" />
        <script src="poupup.js"></script>

       
    </head>
    <body>
        <form id="form1" runat="server">
     <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

         <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true">
            </telerik:RadWindowManager>


       
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
            <div class="demo-container no-bg">
                <telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" GroupBy="Speaker" CustomAttributeNames="Completed" GroupingDirection="Horizontal"
                    OnNavigationCommand="RadScheduler1_NavigationCommand" 
                    AppointmentStyleMode="Default" DataSourceID="EventsDataSource" DataKeyField="ID"
                    FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" DataSubjectField="Description"  RowHeight="40px" EnableTimeZonesEditing="true"
                    DataStartField="StartTime" DataEndField="EndTime" DataRecurrenceField="RecurrenceRule"
                    SelectedView="DayView" DataRecurrenceParentKeyField="RecurrenceParentID" AllowInsert="true" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentDelete="RadScheduler1_AppointmentDelete"  OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"
                   
                    OverflowBehavior="Auto">
                    <AdvancedForm Modal="true"></AdvancedForm>
                    <MonthView UserSelectable="true"></MonthView>
                    <TimelineView />
                    <ResourceHeaderTemplate>
                        <asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
                            <asp:Image ID="SpeakerImage" runat="server" AlternateText='<%= Eval("Text") %>'></asp:Image>
                        </asp:Panel>
                    </ResourceHeaderTemplate>
                    <ResourceTypes>
                        <telerik:ResourceType KeyField="UserID" Name="Speaker" TextField="Fullname" ForeignKeyField="UserID"
                            DataSourceID="SpeakersDataSource1"></telerik:ResourceType>
                    </ResourceTypes>
                    <ResourceStyles>
                        <telerik:ResourceStyleMapping Type="Speaker" Key="1" BackColor="#eb901b"></telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Speaker" Key="2" BackColor="#8fd21b"></telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Speaker" Key="3" BackColor="#278ce9"></telerik:ResourceStyleMapping>
                        <telerik:ResourceStyleMapping Type="Speaker" Key="4" BackColor="#f14db2"></telerik:ResourceStyleMapping>
                    </ResourceStyles>
                    <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
                    <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
                </telerik:RadScheduler>
            </div>
        </telerik:RadAjaxPanel>
        <asp:SqlDataSource ID="SpeakersDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:SQL %>" SelectCommand="SELECT * FROM [user_view]"
            >
        </asp:SqlDataSource>

              <asp:SqlDataSource ID="SpeakersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:myConnectionString %>" SelectCommand="SELECT * FROM [sp_view]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="EventsDataSource" runat="server"
            ConnectionString="<%$ ConnectionStrings:myConnectionString %>"
            SelectCommand="SELECT * FROM [sp_view]" InsertCommand="INSERT INTO [sp_view] ([Description], [StartTime], [EndTime], [SpeakerID]) VALUES (@Description, @Start, @End, @SpeakerID)"
           UpdateCommand="UPDATE [sp_view] SET [Description] = @Description, [Start] = @Start, [End] = @End, [RoomID] = @RoomID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [UserID] = @SpeakerID WHERE [UserID] = @ID"
            DeleteCommand="DELETE FROM [sp_view] WHERE [UserID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Description" Type="String"></asp:Parameter>
                <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="RoomID" Type="Int32" DefaultValue="1"></asp:Parameter>
                <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
                <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
                <asp:Parameter Name="SpeakerID" Type="Int32"></asp:Parameter>
                <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
            </UpdateParameters>
         <InsertParameters>
                <asp:Parameter Name="Description" Type="String"></asp:Parameter>
                <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="RoomID" Type="Int32" DefaultValue="1"></asp:Parameter>
                <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
                <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
                <asp:Parameter Name="SpeakerID" Type="Int32"></asp:Parameter>
            </InsertParameters>
        </asp:SqlDataSource>
     

        <div style="display:none">


        <asp:Button ID="Button1" OnClick="Button1_Click"  runat="server" Text="Button" />
                </div>
        
        </form>
    </body>
    </html>

     

    on the code behide 

    RadScheduler1_AppointmentDelete(object sender, AppointmentDeleteEventArgs e)
            {

    } its not working 

     

    Please help us ASAP

     

    Regards 

    Aakash 

  2. aakash
    aakash avatar
    7 posts
    Member since:
    Feb 2018

    Posted 05 Mar in reply to aakash Link to this post

    any update on this

    Regards 
    Aakash

  3. Peter Milchev
    Admin
    Peter Milchev avatar
    383 posts

    Posted 08 Mar Link to this post

    Hello Aakash,

    Please check if replacing the RadAjaxPanel with asp:Panel would resolve the issue as both the RadAjaxManager and RadAjaxPanel AJAX-enable the Scheduler which could cause some issues and we highly recommend to avoid it. More information on the topic can be found in Controls Wrapped in AjaxPanel and Added to AjaxManager Settings.

    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top