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

AJAX Updating a control from pane 1 to pane 2 delay

4 Answers 67 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Sherry
Top achievements
Rank 1
Sherry asked on 18 Feb 2009, 03:55 PM
I'm using a master page that uses user controls with an AJAX Manager and AJAX Manager Proxies.  In my page, I have the splitter that has two panes.   Pane one contains a control that has a Radio Button List.  When the radio button list value changes, it raises an event.  In Pane 2 is the RadScheduler.  The code-behind captures the first panes Radio Button List event that is raised and captures the event.  This works....BUT....the radscheduler is one step behind updating.  So, if I select the radio button with the value of 10, the radscheduler MinutesPerRow does not change on the AJAX call.  If I change the radio button list value to 15, the radscheduler will update with the 10, not the 15.  If I change it to 25, it will update the scheduler to 15 and not 25....why is there this delay????


<%

@ Page Language="VB" MasterPageFile="~/TelerikAJAXMasterPage.master" AutoEventWireup="false" CodeFile="Scheduler.aspx.vb" Inherits="Scheduler_Scheduler" %>

 

<%

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

 

<%

@ Register TagPrefix="Scheduler" TagName="DisplayPanel" Src="~/Controls/Scheduler/DisplayPanel.ascx" %>

 

<

asp:Content ContentPlaceHolderID="AJAXContentPlaceHolder" runat="server">

 

 

<script type="text/javascript" language="javascript">

 

 

function AppointmentEditing(sender, eventArgs) {

 

 

var apt = eventArgs.get_appointment();

 

window.radopen(

"Appointment.aspx?Mode=Edit&AppointmentId=" + apt.ID, "rwAdvancedForm");

 

eventArgs.set_cancel(

true);

 

}

 

function AppointmentInserting(sender, eventArgs) {

 

 

var start = formatDate(eventArgs.get_startTime());

 

 

var isAllDay = eventArgs.get_isAllDay();

 

 

// New appointment

 

window.radopen(

"Appointment.aspx?Mode=Insert&Start=" + start + "&IsAllDay=" + isAllDay, "rwAdvancedForm");

 

eventArgs.set_cancel(

true);

 

}

 

function formatDate(date) {

 

 

var year = padNumber(date.getUTCFullYear(), 4);

 

 

var month = padNumber(date.getUTCMonth() + 1, 2);

 

 

var day = padNumber(date.getUTCDate(), 2);

 

 

var hour = padNumber(date.getUTCHours(), 2);

 

 

var minute = padNumber(date.getUTCMinutes(), 2);

 

 

return year + month + day + hour + minute;

 

}

 

function padNumber(number, totalDigits) {

 

number = number.toString();

 

var padding = '';

 

 

if (totalDigits > number.length) {

 

 

for (i = 0; i < (totalDigits - number.length); i++) {

 

padding +=

'0';

 

}

}

 

return padding + number.toString();

 

}

 

function refreshScheduler() {

 

 

var ajaxManager = $find("RadAjaxManager2");

 

ajaxManager.ajaxRequest(

'RebindScheduler');

 

}

</

script>

 

<

telerik:RadSplitter ID="rpScheduler" Width="1024" BorderSize="0"

 

 

FullScreenMode="true" BorderStyle="None" runat="server" Skin="Vista">

 

 

<telerik:RadPane ID="rpOptions" Width="22px" runat="server">

 

 

<telerik:RadSlidingZone ID="rszOptions" runat="server">

 

 

<telerik:RadSlidingPane Title="Display" Width="230" runat="server">

 

 

<Scheduler:DisplayPanel ID="dpSideBar" runat="server" />

 

 

</telerik:RadSlidingPane>

 

 

</telerik:RadSlidingZone>

 

 

</telerik:RadPane>

 

<

telerik:RadPane ID="rpBody" runat="server">

 

 

<telerik:RadScheduler ID="rsMainScheduler"

 

 

DataEndField="End" DataKeyField="ID" DataStartField="Start"

 

 

DataSubjectField="Subject"

 

 

StartEditingInAdvancedForm="true"

 

 

StartInsertingInAdvancedForm="true"

 

 

OnClientAppointmentEditing="AppointmentEditing"

 

 

OnClientAppointmentInserting="AppointmentInserting"

 

 

SelectedView="DayView"

 

 

Height="600"

 

 

runat="server" Skin="Vista" MonthView-HeaderDateFormat="MMMM, yyyy">

 

 

<TimelineView UserSelectable="false" />

 

 

</telerik:RadScheduler>

 

</

telerik:RadPane>

 

</

telerik:RadSplitter>

 

<

telerik:RadAjaxManagerProxy ID="rampScheduler" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="rpScheduler">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="rpScheduler" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

</

telerik:RadAjaxManagerProxy>

 

</

asp:Content>

 

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 20 Feb 2009, 11:11 AM
Hi Edward,

Please, call Rebind() for RadScheduler after you set the MinutesPerRow property.
 protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)  
    {  
        RadScheduler1.MinutesPerRow = Convert.ToInt32(RadioButtonList1.SelectedValue);  
        RadScheduler1.Rebind();  
    } 


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Accepted
Peter
Telerik team
answered on 20 Feb 2009, 11:12 AM
Hi Edward,

Please, call Rebind() for RadScheduler
 protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)  
    {  
        RadScheduler1.MinutesPerRow = Convert.ToInt32(RadioButtonList1.SelectedValue);  
        RadScheduler1.Rebind();  
    } 


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sherry
Top achievements
Rank 1
answered on 20 Feb 2009, 01:53 PM
So simple!  THanks for the input.  This forum is more helpful than the support I'm paying for!!!!!!  Almost a waste of money.
0
Peter
Telerik team
answered on 20 Feb 2009, 04:00 PM
Hi Edward,

I am glad I could help you. However, I could not provide you with an answer to your support ticket since you haven't described your scenario in such detail as in here. Anyway, I followed up your support ticket with the same suggestion. :)

In general, to get a fast reply from telerik, please include as many details as possible around your case. Ideally, send a working demo of the problem that you experience. This will save extra round trips which usually require you to send more information.


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Splitter
Asked by
Sherry
Top achievements
Rank 1
Answers by
Peter
Telerik team
Sherry
Top achievements
Rank 1
Share this question
or