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

making subject and 1 resource mandatory

2 Answers 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Reini
Top achievements
Rank 2
Reini asked on 05 May 2008, 12:08 PM
hi all!

maybe i'm missing something, but i need to have the subject and one on my resources mandatory when editing or inserting an appointment.

how can i achieve that?

i'm able to the event 'appointment_insert' to check if the subject is empty & also check the resource if is nothing....

but when updating i always get the 'old' values in the 'appointment_update' event - so when some one has deleted the subject i cannot check or stop him from doing so...

are there any examples i'm missing?

please help me :-)
thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 08 May 2008, 03:48 PM
Hi Reini,

We couldn't reproduce the decribed problem with version 2008.1.415. The following code works as expected:
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)  
    {  
        if (e.ModifiedAppointment.Subject == "")  
            e.Cancel = true;  
    } 

If there are any other factors we need to consider, please specify them.


Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Reini
Top achievements
Rank 2
answered on 08 May 2008, 04:00 PM
oh yes - now it's clear to me :-) that's what i said: 'i'm missing something'...

i was not using the 'e.ModifiedAppointment' but the same code as in the 'insert' function: e.Appointment.... which was of course still the NOT modified one....

thank you! works fine now!
Tags
Scheduler
Asked by
Reini
Top achievements
Rank 2
Answers by
Peter
Telerik team
Reini
Top achievements
Rank 2
Share this question
or