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

RadAjaxManager - sys.webforms.pagerequestmanager is null

5 Answers 209 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
yossi
Top achievements
Rank 1
yossi asked on 19 Mar 2008, 08:13 AM
hello,
 how are you all?

i recently started to work with "Prometheus" Scheduler.

i placed on a page Scheduler and Calender.

whem i dont use RadAjaxManager its work fine,i mean selecting a date on the calendar do effect the scheduler - ofcourse  with postback.

when i add the RadAjaxManager to the page i keep getting this JS error :

sys.webforms.pagerequestmanager is null - what is this?

hope some one can help me.

thanks.

here is my form and code  behind :

<%

@ Page Language="C#" MasterPageFile="~/Basic.master" AutoEventWireup="true" CodeFile="prometheus.aspx.cs"

Inherits="prometheus" Title="Untitled Page" EnableEventValidation="false" %>

<%

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

<

asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="Server">

<title>Promotheus</title>

</

asp:Content>

<

asp:Content ID="Content2" ContentPlaceHolderID="TopHeader" runat="Server">

Promotheus

</

asp:Content>

<

asp:Content ID="Content3" ContentPlaceHolderID="PageInnerTitle" runat="Server">

Promotheus

</

asp:Content>

<

asp:Content ID="Content4" ContentPlaceHolderID="Content" runat="Server">

<asp:ScriptManager ID="ScriptManager" runat="server" />

<telerik:RadAjaxManager EnableAJAX=true ID="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating">

</telerik:RadAjaxManager>

<telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Office2007" AutoPostBack="true"

EnableMultiSelect="false" DayNameFormat="Shortest" UseRowHeadersAsSelectors="true"

OnSelectionChanged="RadCalendar1_SelectionChanged">

</telerik:RadCalendar>

<telerik:RadScheduler ShowViewTabs="false" runat="server" ID="RadScheduler1" Width="100%"

Height="565px" Skin="Office2007" DataKeyField="ID" DayEndTime="18:00:00" DayStartTime="08:00:00"

TimeZoneOffset="03:00:00" SelectedView="WeekView" WeekHeaderDateFormat="dd.MM"

OnAppointmentCreated="RadScheduler1_AppointmentCreated">

</telerik:RadScheduler>

</

asp:Content>


Code Behind :


protected

void Page_Load(object sender, EventArgs e)

{

RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadCalendar1,RadScheduler1);

if (!IsPostBack)

{

//Machines.DataSource = bpss.BLL.Machine.GetAll();

RadCalendar1.SelectedDate = RadScheduler1.SelectedDate;

RadCalendar1.FocusedDate = RadScheduler1.SelectedDate;

LoadData();

}

}

private void LoadData()

{

machineID =

Utilities.ParseIntSafe(1);

if(machineID>0)

{

machine =

new bpss.BLL.Machine(1);

RadScheduler1.DataSource =

machine.GetTimeTableAndOrders(RadScheduler1.SelectedDate, RadScheduler1.SelectedDate.AddDays(7));

RadScheduler1.DataStartField =

"Start";

RadScheduler1.DataEndField =

"End";

RadScheduler1.DataSubjectField =

"Notes";

}

DataBind();

}

protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)

{

if (RadCalendar1.SelectedDates.Count > 0)

{

RadScheduler1.SelectedDate = RadCalendar1.SelectedDate;

}

}

 

protected void RadAjaxManager1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)

{

e.UpdatePanel.UpdateMode =

UpdatePanelUpdateMode.Always;

}

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 19 Mar 2008, 09:08 AM
Hi yossi,

I have not been able to reproduce the problem with the code you provided. Please make sure that you have AjaxEnabledWebSite for your project and that you have MS AJAX installed on your machine. I am attaching the default web.config for ajax enabled web sites for your convenience.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
yossi
Top achievements
Rank 1
answered on 19 Mar 2008, 11:17 AM
Hi Steve,

thanks for your answer.

actually the problem has been solved by changing the value of this line in the WEB.CONFIG file from :

<

xhtmlConformance mode="Legacy"/>

to :

<

xhtmlConformance mode="Transinional"/>

thanks,anyway.

another question please:

How do i configure the scheduler to place appointments for half an hour,
example : from 12:00 to 12:30.

the scheduler allow to work only with "complete hours".

thank you.

0
Peter
Telerik team
answered on 19 Mar 2008, 05:21 PM
Hi yossi,

As for the scheduler question, please try this:
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)     
    {     
        e.Appointment.End = e.Appointment.Start.Add(new TimeSpan(0, 30, 0));     
    }    
 



Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Russ
Top achievements
Rank 2
answered on 11 Sep 2008, 01:22 AM
Finally, after searching online for 10 hours and trying (what seemed like) everything, by adding xhtmlConformance mode="Transinional" to my web.config I was able to over come the infamous "sys.WebPage.PageRequest is null..." error.

I would sure be interested to hear from a Telerik guru on why this resolves the problem...as it only showed up when adding the RadAjaxManager to a page (and by not having the web.config element listed above).

Regards,
Russ
0
Vlad
Telerik team
answered on 11 Sep 2008, 06:00 AM
Hi Russ,

Here is the explanation directly from Scott Guthrie:
http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
yossi
Top achievements
Rank 1
Answers by
Steve
Telerik team
yossi
Top achievements
Rank 1
Peter
Telerik team
Russ
Top achievements
Rank 2
Vlad
Telerik team
Share this question
or