This is a migrated thread and some comments may be shown as answers.

[Solved] scheduler postback rather than using ajax

8 Answers 172 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gregor Suttie
Top achievements
Rank 1
Gregor Suttie asked on 22 Oct 2009, 10:07 AM
I am trying to use the rad scheduler but when I change the view from say day to week (top right) I get a full postback rather than a nice
ajax update on the page, can someone advise please?

My code as follows:-

<
%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="PulsionTechnology.RefugeeCouncil.WebForm3" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
      
</head> 
<body class="BODY">  
    <form id="form1" runat="server">  
        <telerik:RadScriptManager runat="Server" ID="RadScriptManager1" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
        <div class="bigModule">  
            <div class="bigModuleBottom">  
                In this example <strong>RadScheduler</strong> is bound to a custom provider - the  
                XmlSchedulerProvider.  
                <br /> 
                The provider uses an XML document for data storage.  
                <br /> 
                Please, refer to the documentation for the complete source code of the provider  
                and information about implementing your own providers.  
            </div> 
        </div> 
        <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" TimeZoneOffset="03:00:00" 
            SelectedDate="2007-03-30" DayStartTime="08:00:00" DayEndTime="18:00:00" OnDataBound="RadScheduler1_DataBound">  
            <AdvancedForm Modal="true" /> 
        </telerik:RadScheduler> 
    </form> 
</body> 
</html> 



And Code behind:-

using System;  
using System.Web.UI;  
using Telerik.Web.UI;  
 
 
namespace PulsionTechnology.RefugeeCouncil  
{  
    public partial class WebForm3 : System.Web.UI.Page  
    {  
        private const string ProviderSessionKey = "Telerik.Web.Examples.Scheduler.XmlSchedulerProvider.DefaultCS";  
 
        // You can safely ignore this method.  
        // Its purpose is to limit the changes to the underlying data only to the active user session.  
        protected void Page_Init(object sender, EventArgs e)  
        {  
            XmlSchedulerProvider provider;  
            provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), false);  
            RadScheduler1.Provider = provider;  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        protected void RadScheduler1_DataBound(object sender, EventArgs e)  
        {  
            // Turn off the support for multiple resource values.  
            foreach (ResourceType resType in RadScheduler1.ResourceTypes)  
            {  
                resType.AllowMultipleValues = false;  
            }  
        }  
    }  
 

8 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Oct 2009, 02:53 PM
Hello Gregor,

This code seems correct. You can actually test it in this online demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/xmlschedulerprovider/defaultcs.aspx

Do you get a postback only when changing the views or in other situations such as inserting or editing an appointment?


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gregor Suttie
Top achievements
Rank 1
answered on 23 Oct 2009, 02:57 PM
Hi Peter

Thanks for your reply - the demo works fine, the samples even work locally.

I grabbed the source from the demo page and then ripped out the head, headtag and footer control, still getting postbacks instead of async postbacks.

Same thing for adding and deleting an entry.
0
Gregor Suttie
Top achievements
Rank 1
answered on 26 Oct 2009, 01:19 PM
Any chance of some help figuring out why this doesnt work - i took a copy of the deom page and then removed the header tag and it does the same thing - postback rather than an async postback - why do I need to have the header tag and how much can I rip out - i dont want to have to include the header and footer code.
0
Peter
Telerik team
answered on 26 Oct 2009, 02:35 PM
Hi Gregor,

You don't need the header or footer tags for the ajax functionality.

I am not sure why you experience this problem. The best way to help you sort it out would be for you to isolate the issue in a simple working demo project and send it to us via a support ticket.

Please, let us know if you have further questions.


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gregor Suttie
Top achievements
Rank 1
answered on 26 Oct 2009, 02:37 PM
Hi Peter

The entire source for the page has been posted - I am only testing the telerik controls out I dont actually have a licence at this point - so how do I create a support ticket?
0
Peter
Telerik team
answered on 28 Oct 2009, 01:48 PM
Hi Gregor,

Can you try setting the Skin property for the RadAjaxLoadingPanel? I have prepared and attached a simple demo which you can use for reference.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Accepted
Peter
Telerik team
answered on 28 Oct 2009, 01:50 PM

And here is the demo project. :)



Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gregor Suttie
Top achievements
Rank 1
answered on 28 Oct 2009, 02:02 PM
Hi Peter

Many thanks, I started the page again and its working now - many thanks for demo project - I noticed that I had changed a few things around and starting again, it now works.

Thanks for your help.

Tags
Scheduler
Asked by
Gregor Suttie
Top achievements
Rank 1
Answers by
Peter
Telerik team
Gregor Suttie
Top achievements
Rank 1
Share this question
or