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

How to fire AppointmentCreated when Scheduler is in a Repeater

8 Answers 51 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 03 Sep 2009, 09:23 AM
This is the code stub I was using to display appointment data on the schedule control 

 

Protected Sub RS_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) 

Handles RS.AppointmentCreated

 

 

----
----
End
Sub

The Scheduler is now inside a repeater control what do I need to do to get this to work. (The handles RS cant get a handle on the control as its inside the repeater)

Andy

8 Answers, 1 is accepted

Sort by
0
Andy Green
Top achievements
Rank 1
answered on 03 Sep 2009, 12:23 PM
0
Accepted
Peter
Telerik team
answered on 03 Sep 2009, 02:44 PM
Hello Andy,

I replied in the other forum thread, but here is the solution in case someone else needs it:

This is a VB.NET problem. The solution which I found in the forums is to set the event handler declaratively:

* * *  
 
<telerik:RadScheduler runat="server" ID="RadScheduler1" OnAppointmentCreated="RadScheduler1_AppointmentCreated">  
 
* * * 

and to remove "Handles RadScheduler1.AppointmentCreated" from the event handler:

Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs)  
 
End Sub 




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
Andy Green
Top achievements
Rank 1
answered on 03 Sep 2009, 02:51 PM
Thank you, I thought the other post was dead.

One more thing, how do I stop the drag and drop whilst still fire the FormCreating event

Andy
0
Peter
Telerik team
answered on 04 Sep 2009, 07:49 AM
Hello Andy,

FormCreating fired as expected in my test page. Please, download the attached demo and let us know what is different in your case.


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
Andy Green
Top achievements
Rank 1
answered on 04 Sep 2009, 08:45 AM
Thanks Peter

I got it working and edited my post, but not before you spent time on it , sorry about that. It was a build issue. I didn't rebuild between tries, most times you dont have to, but thats what it was.

My only problem now is disabling drag and drop, whilt still allowing the Formcreating event to fire. If I turn off editing then the event doesn't fire.

Andy
0
Accepted
Peter
Telerik team
answered on 04 Sep 2009, 08:55 AM

To disable dragging of appointments, you can cancel OnClientAppointmentMoving:

 <script type="text/javascript">  
        function OnClientAppointmentMoving(sender, eventArgs) {  
            eventArgs.set_cancel(true);  
        }  
    </script> 
     <telerik:RadScheduler runat="server" ID="RadScheduler1"   
           OnClientAppointmentMoving="OnClientAppointmentMoving"


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
Andy Green
Top achievements
Rank 1
answered on 07 Sep 2009, 09:06 AM
Ok One last question on this.

Following on from your previous answer I've used the following to stop the resizing:

OnClientAppointmentResizing

 

="OnClientAppointmentResizing"

 

 

function OnClientAppointmentResizing(sender, eventArgs) {

 

eventArgs.set_cancel(

true);

 

}


But the event is still firing, what have I missed.
Andy
0
Peter
Telerik team
answered on 08 Sep 2009, 10:30 AM
Hello Andy,

This is strange. In our test project, resizing was canceled as expected using this code. Can you open a support ticket and send us a simple working demo which we can test locally?



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.
Tags
Scheduler
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Andy Green
Top achievements
Rank 1
Peter
Telerik team
Share this question
or