Hi
I have created my self a custom advanced insert form and added a checkbox list to it and a new dropdown list.
Then added
properties for each of these in the code behind that set them and get their values.
In my rad scheduler my custom insert template is added like so:
The insert opens ok and what ever's passed in appears but in my AppointmentInsert event I don't know how to get at these values to add to the appointment.
Before I created the advanced form my insert was like so:
Now I have added custom properties how do I get al them?
Should the be in the e.Appointment? They do not appear under resources or attributes.
My full radScheduler html is:
Do I need to add something else?
Bex
I have created my self a custom advanced insert form and added a checkbox list to it and a new dropdown list.
Then added
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
properties for each of these in the code behind that set them and get their values.
In my rad scheduler my custom insert template is added like so:
<
AdvancedInsertTemplate
>
<
uc1:ScheduleInsertEditor
ID
=
"ScheduleInsertEditor1"
runat
=
"server"
Mode
=
"Insert"
Subject='<%# Eval("Subject") %>'
Description='<%# Eval("Description") %>'
Start='<%# Eval("Start") %>'
End='<%# Eval("End") %>'
RecurrenceRuleText='<%# Eval("RecurrenceRule") %>'
Type='<%# Eval("Type")??0 %>'
Users='<%#GetUsers( Eval("Id")==null?0:int.Parse(Eval("AppointmentId").ToString() )) %>'
></
uc1:ScheduleInsertEditor
>
</
AdvancedInsertTemplate
>
The insert opens ok and what ever's passed in appears but in my AppointmentInsert event I don't know how to get at these values to add to the appointment.
Before I created the advanced form my insert was like so:
protected
void
RadScheduler1_AppointmentInsert(
object
sender, SchedulerCancelEventArgs e)
{
//add the new appointment to the db
int
? recurrentParentId =
null
;
if
(e.Appointment.RecurrenceParentID !=
null
) recurrentParentId = (
int
)e.Appointment.RecurrenceParentID;
AppointmentManager.AddUserAppointment(
UserId,
int
.Parse(e.Appointment.Resources[0].Key.ToString()),
e.Appointment.Start,
e.Appointment.End,
e.Appointment.RecurrenceRule,
recurrentParentId,
e.Appointment.Description,
e.Appointment.Subject);*/
BindBindSchedule();
}
Now I have added custom properties how do I get al them?
Should the be in the e.Appointment? They do not appear under resources or attributes.
My full radScheduler html is:
<
telerik:RadScheduler
runat
=
"server"
ID
=
"SchToday"
DayStartTime
=
"08:00:00"
DayEndTime
=
"22:00:00"
StartInsertingInAdvancedForm
=
"true"
ShowNavigationPane
=
"true"
OnAppointmentInsert
=
"RadScheduler1_AppointmentInsert"
OnAppointmentUpdate
=
"RadScheduler1_AppointmentUpdate"
OnAppointmentDelete
=
"RadScheduler1_AppointmentDelete"
DataKeyField
=
"AppointmentId"
DataStartField
=
"Start"
DataSubjectField
=
"Subject"
DataEndField
=
"EndX"
FirstDayOfWeek
=
"Monday"
ShowHeader
=
"true"
ShowFooter
=
"false"
>
<
AdvancedForm
Modal
=
"true"
/>
<
DayView
UserSelectable
=
"true"
/>
<
WeekView
UserSelectable
=
"true"
/>
<
MonthView
UserSelectable
=
"true"
/>
<
DayView
HeaderDateFormat
=
"ddd dd MMMM yyyy"
/>
<
WeekView
HeaderDateFormat
=
"ddd dd MMMM yyyy"
/>
<
TimelineView
HeaderDateFormat
=
"ddd dd MMMM yyyy"
/>
<
MonthView
HeaderDateFormat
=
"MMMM yyyy"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
<
AdvancedInsertTemplate
>
<
uc1:ScheduleInsertEditor
ID
=
"ScheduleInsertEditor1"
runat
=
"server"
Mode
=
"Insert"
Subject='<%# Eval("Subject") %>'
Description='<%# Eval("Description") %>'
Start='<%# Eval("Start") %>'
End='<%# Eval("End") %>'
RecurrenceRuleText='<%# Eval("RecurrenceRule") %>'
Type='<%# Eval("Type")??0 %>'
Users='<%#GetUsers( Eval("Id")==null?0:int.Parse(Eval("AppointmentId").ToString() )) %>'
></
uc1:ScheduleInsertEditor
>
</
AdvancedInsertTemplate
>
<
AppointmentTemplate
>
<
div
>
<
h2
>
<%# Eval("Subject") %>
</
h2
>
</
div
>
</
AppointmentTemplate
>
</
telerik:RadScheduler
>
Do I need to add something else?
Bex