hi, I have a simple Scheduler object. I would like make required the selection of resource in advances form edit for new appointment as the subject, can I do? I have found a trick to stop the execution server side using the
Thanks
RadScheduler1_AppointmentInsert event, but not idea ho to show message.Thanks
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e) { //cerco l'agente selezionato Resource UserRes = e.Appointment.Resources.GetResourceByType("Agente"); if (UserRes != null) {
//DO BUSINESS Appointments.Add(new TrilanceScheduleBase(e.Appointment)); } else { //STOP
e.Cancel = true; } }<telerik:RadScheduler runat="server" ID="RadScheduler1" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" DayStartTime="07:00:00" DayEndTime="20:00:00" TimeZoneOffset="03:00:00" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentDelete="RadScheduler1_AppointmentDelete" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentId" Height="100%" onappointmentdatabound="RadScheduler1_AppointmentDataBound" ondatabound="RadScheduler1_DataBound" Culture="Italian (Italy)" EditFormTimeFormat="HH.mm" FirstDayOfWeek="Monday" HoursPanelTimeFormat="HH" SelectedView="WeekView" StartInsertingInAdvancedForm="True" onformcreating="RadScheduler1_FormCreating"> <DayView DayEndTime="20:00:00" DayStartTime="07:00:00" WorkDayEndTime="20:00:00" WorkDayStartTime="07:00:00" /> <AdvancedForm Modal="true" TimeFormat="HH.mm" /> <TimelineView UserSelectable="false" /> <WeekView DayEndTime="20:00:00" DayStartTime="07:00:00" WorkDayEndTime="07:00:00" WorkDayStartTime="20:00:00" /> <TimeSlotContextMenuSettings EnableDefault="true" /> <AppointmentContextMenuSettings EnableDefault="true" /> </telerik:RadScheduler>