Greetings all,
I'm new to using telerik radcontrols, and I was having difficulty understanding how appointments are added or edited using the dialog box within the scheduler.
I have the AllowInsert property set to "true", which makes a dialog box appear with the Save, Cancel and Option buttons. I can enter text in the textbox, or hit options, which opens a separate box, but in either case, the changes I make are not saved. However, the delete function works fine...
Here's the html:
<telerik:RadScheduler ID="rsMyCalendar" AllowDelete="true" AllowEdit="true" AllowInsert="true"
DataSourceID="sdsMyCalendar" DataKeyField="EventID" DataSubjectField="Subject"
DataStartField="StartDate" DataEndField="EndDate" DataDescriptionField="Description"
DisplayDeleteConfirmation="true" EnableDescriptionField="true" EnableDatePicker="true"
DayView-DayStartTime="08:00:00" DayView-DayEndTime="17:00:00" WorkDayStartTime="08:00:00"
WorkDayEndTime="17:00:00" runat="server" StartEditingInAdvancedForm="true" OnAppointmentClick="OnAppointmentClick1"
OverflowBehavior="Expand" SelectedView="MonthView" Skin="Windows7" EnableEmbeddedSkins="true"
OnAppointmentDelete="rsMyCalendar_AppointmentDelete">
<MonthView GroupingDirection="Vertical" />
<AppointmentTemplate>
<%# Eval("Subject") %>
</AppointmentTemplate>
</telerik:RadScheduler>
Here's the code behind:
protected void OnAppointmentClick1(object sender, SchedulerEventArgs e)
{
int id = (int)e.Appointment.ID;
Response.Redirect("event.aspx?id=" + id);
}
protected void rsMyCalendar_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
{
Events E = new Events();
E.EventID = (int)e.Appointment.ID;
EventsDAL.Delete(ref E);
}
protected void rsMyCalendar_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
{
Events E = new Events();
E.EventID = (int)e.Appointment.ID;
EventsDAL.Insert(ref E);
}
What am I missing here?
Thanks for the help,
Jack
I'm new to using telerik radcontrols, and I was having difficulty understanding how appointments are added or edited using the dialog box within the scheduler.
I have the AllowInsert property set to "true", which makes a dialog box appear with the Save, Cancel and Option buttons. I can enter text in the textbox, or hit options, which opens a separate box, but in either case, the changes I make are not saved. However, the delete function works fine...
Here's the html:
<telerik:RadScheduler ID="rsMyCalendar" AllowDelete="true" AllowEdit="true" AllowInsert="true"
DataSourceID="sdsMyCalendar" DataKeyField="EventID" DataSubjectField="Subject"
DataStartField="StartDate" DataEndField="EndDate" DataDescriptionField="Description"
DisplayDeleteConfirmation="true" EnableDescriptionField="true" EnableDatePicker="true"
DayView-DayStartTime="08:00:00" DayView-DayEndTime="17:00:00" WorkDayStartTime="08:00:00"
WorkDayEndTime="17:00:00" runat="server" StartEditingInAdvancedForm="true" OnAppointmentClick="OnAppointmentClick1"
OverflowBehavior="Expand" SelectedView="MonthView" Skin="Windows7" EnableEmbeddedSkins="true"
OnAppointmentDelete="rsMyCalendar_AppointmentDelete">
<MonthView GroupingDirection="Vertical" />
<AppointmentTemplate>
<%# Eval("Subject") %>
</AppointmentTemplate>
</telerik:RadScheduler>
Here's the code behind:
protected void OnAppointmentClick1(object sender, SchedulerEventArgs e)
{
int id = (int)e.Appointment.ID;
Response.Redirect("event.aspx?id=" + id);
}
protected void rsMyCalendar_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
{
Events E = new Events();
E.EventID = (int)e.Appointment.ID;
EventsDAL.Delete(ref E);
}
protected void rsMyCalendar_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
{
Events E = new Events();
E.EventID = (int)e.Appointment.ID;
EventsDAL.Insert(ref E);
}
What am I missing here?
Thanks for the help,
Jack