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

[Solved] Scheduler OnClientTimeSlotClick Event with LoadingPanel

3 Answers 223 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 18 Apr 2008, 04:41 PM
Hello,

I'm currently trying to get the RadAjaxLoadingPanel to show up when the OnClientTimeSlotClick event is fired.  Currently the LoadingPanel shows up when insert, update and delete events are fired.  But anytime I call a javascript function it doesn't show up.  Since OnClientTimeSlotClick is a client side event related to the scheduler shouldn't the loading ClientEvents OnRequestStart execute?

Is there any way for me to get the Loading Panel to show when the OnClientTimeSlotClick is executed from the Scheduler?

function RequestStart(sender, eventArgs)

{

currentLoadingPanel = $find(

"<%=this.RadAjaxLoadingPanel1.ClientID%>");

currentUpdatedControl =

"<%=this.RadScheduler1.ClientID%>";

//show the loading panel over the updated control

currentLoadingPanel.show(currentUpdatedControl);

}

function ResponseEnd(sender, eventArgs)

{

//hide the loading panel and clean up the global variables

if (currentLoadingPanel != null)

currentLoadingPanel.hide(currentUpdatedControl);

currentUpdatedControl =

null;

currentLoadingPanel =

null;

}


function OnClientTimeSlotClick(sender, eventArgs)

{

var eventTimeSlotClicked = eventArgs.get_time();

var hdnCalendarStartDate = document.getElementById("<%=this.hdnCalendarStartDate.ClientID%>");

hdnCalendarStartDate.value = eventTimeSlotClicked;

__doPostBack(

"<%=this.hdnCalendarStartDate.ClientID%>", eventTimeSlotClicked);

}


On the ASP Page I have

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

<ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />

</telerik:RadAjaxManager>

Thanks,
David

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Apr 2008, 04:35 PM
Hello David,

RadAjax LoadingPanel should show up when the OnClientTimeSlotClick event fires. Maybe the code executes too fast for any visual indication to be perceived. Please, try setting the InitialDelayTime of RadAjax LoadingPanel and see if this makes a difference.

Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 2
answered on 22 Apr 2008, 03:25 PM

It's not that.  I changed that property and it seems that the client event is not connected somehow.  After the client side event fires, the postback executes a ValueChanged event which makes the DayView for the RadSheduler show up.

I've even tried putting this event in the Client Events, but for some reason the RequestStart event doesn't fire.  Even if I put the code directly into the OnClientTimeSlotClick event it still doesn't show.  It finds the LoadingPanel control, but doesn't show it.

Should I be doing this a different way?
My client side event looks as follows

function RequestStart(sender, eventArgs)

{

currentLoadingPanel = $find(

"<%=this.RadAjaxLoadingPanel1.ClientID%>");

currentUpdatedControl =

"<%=this.RadScheduler1.ClientID%>";

//show the loading panel over the updated control

 

currentLoadingPanel.show(currentUpdatedControl);

}

function OnClientTimeSlotClick(sender, eventArgs)

{

var eventTimeSlotClicked = eventArgs.get_time();

var hdnCalendarStartDate = document.getElementById("<%=this.hdnCalendarStartDate.ClientID%>");

hdnCalendarStartDate.value = eventTimeSlotClicked;

__doPostBack(

"<%=this.hdnCalendarStartDate.ClientID%>", eventTimeSlotClicked);

}

0
Dimitar Milushev
Telerik team
answered on 25 Apr 2008, 11:48 AM
Hello David,

Please find attached a sample project that demonstrates the easiest approach to achieve this.

In the example, I set the OnClientTimeSlotClick to update a Panel in the sake of simplicity, but updating a Calendar should be just as easy.


Greetings,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
David
Top achievements
Rank 2
Answers by
Peter
Telerik team
David
Top achievements
Rank 2
Dimitar Milushev
Telerik team
Share this question
or