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

Scheduler Assistance

4 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cyprian
Top achievements
Rank 1
Cyprian asked on 10 Nov 2017, 12:22 PM

Hello

Am testing to buy the package because of scheduler control specifically.

I have developed a form which I want to replace with the appointment and I want it popup each time you double click. I don't want the default appointment.

I want to know how time and date comes and Id storing the unique code such that I know how to extract them and use it in my advanced form already designed since the appointment cant give me what I need exactly.

There is global delete right I want to be tied to record, there are some records to be deleted while others are read only so I need to specify them such that when double click is hit it already know what to do.

 

Please how do I achieve this.

 

Thanks

4 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 15 Nov 2017, 11:43 AM

Hi,

http://demos.telerik.com/aspnet-ajax/scheduler/examples/raddock/defaultcs.aspx and https://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/how-to/replace-the-edit-form should help you to use your custom edit form instead of the built-in advanced form.

To allow only some of the appointments to be deletable, you can use the AppointmentDataBound event and set the AllowDelete or AllowEdit properties of the appointments.

 

0
Cyprian
Top achievements
Rank 1
answered on 15 Nov 2017, 12:15 PM

Pls can you give complete form and its code in vb to enable me complete the rest.

For whatever the reason all I got from your site are not working.

 

0
Cyprian
Top achievements
Rank 1
answered on 15 Nov 2017, 12:18 PM
How can I disabled Save button at runtime?
0
Peter Milchev
Telerik team
answered on 20 Nov 2017, 11:02 AM
Hello Cyprian,

Instead of hiding the Update/Save button in the custom form, we recommend not allowing the editing in the first place. 

There are some approaches that should help to achieve that: 

<telerik:RadScheduler runat="server" ID="RadScheduler1" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
            DataSourceID="AppointmentsDataSource" OnClientAppointmentDeleting="OnClientAppointmentDeleting" ... >

1) In the AppointmentDataBound event to set the AllowEdit and AllowDelete properties of the appointment to false to prevent editing and deleting.

Protected Sub RadScheduler1_AppointmentDataBound(sender As Object, e As SchedulerEventArgs)
    ' custom condition to determine should the appointment be editable
    If True Then
        e.Appointment.AllowEdit = False
        e.Appointment.AllowDelete = False
    End If
End Sub


2) Use the OnClientAppointmentEditing and OnClientAppointmentDeleting client-side events to determine if the editing or deleting should be prevented.

function OnClientAppointmentEditing(sender, args) {
    // cancel appointment editing
    args.set_cancel(true)
}
  
function OnClientAppointmentDeleting(sender, args) {
    // cancel appointment deleting
    args.set_cancel(true)
}

Also, we strongly recommend to always include a server validation for the user permission to add or edit appointments before actually inserting or updating an appointment.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Cyprian
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Cyprian
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or