hi
I am new to telerik controls so please help me to sort out this problem.
I am using AdvanceInsert and AdvanceEdit template to save and edit the appointments. i also used resources and custome attributes in scheduler to match my requirements, but i wasn't been able to fetch the resources values on "schActivities_AppointmentInsert" event.
let me show you my code to explain the issue.
In aspx
In cs file
but i wasn't been able to get resources values in insert event. actually in my scheduler there are three kind of appointment "Meeting", "Call", "Task" and i need to set the Activity Type on insert command, but i can't find it through resources. Please help me in this.
Regards
Manmeet Singh
I am new to telerik controls so please help me to sort out this problem.
I am using AdvanceInsert and AdvanceEdit template to save and edit the appointments. i also used resources and custome attributes in scheduler to match my requirements, but i wasn't been able to fetch the resources values on "schActivities_AppointmentInsert" event.
let me show you my code to explain the issue.
In aspx
<
telerik:RadScheduler
ID
=
"schActivities"
Width
=
"100%"
Height
=
"100%"
runat
=
"server"
Skin
=
"Office2007"
SelectedView
=
"MonthView"
DayStartTime
=
"08:00:00"
DayEndTime
=
"18:00:00"
TimeZoneOffset
=
"03:00:00"
DataKeyField
=
"ID"
DataSubjectField
=
"ActName"
DataDescriptionField
=
"Description"
DataStartField
=
"StartDate"
DataEndField
=
"EndDate"
OnClientTimeSlotContextMenu
=
"OnClientTimeSlotContextMenu"
OnFormCreated
=
"OnFormCreated"
StartInsertingInAdvancedForm
=
"true"
StartEditingInAdvancedForm
=
"true"
OnTimeSlotContextMenuItemClicking
=
"OnTimeSlotContextMenuItemClicking"
OnClientFormCreated
=
"schedulerFormCreated"
AllowDelete
=
"false"
CustomAttributeNames
=
"ActType,Priority,Location,ContactIDs,Notes"
>
<
AdvancedForm
Modal
=
"true"
Enabled
=
"true"
Width
=
"570"
/>
<
TimelineView
UserSelectable
=
"false"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
<
ResourceTypes
>
<
telerik:ResourceType
KeyField
=
"Value"
Name
=
"ActType"
TextField
=
"Value"
ForeignKeyField
=
"ActType"
/>
<
telerik:ResourceType
KeyField
=
"Value"
Name
=
"Priority"
TextField
=
"Value"
ForeignKeyField
=
"Priority"
/>
</
ResourceTypes
>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"Priority"
Text
=
"Low"
ApplyCssClass
=
"rsCategoryGreen"
/>
<
telerik:ResourceStyleMapping
Type
=
"Priority"
Text
=
"Medium"
ApplyCssClass
=
"rsCategoryOrange"
/>
<
telerik:ResourceStyleMapping
Type
=
"Priority"
Text
=
"High"
ApplyCssClass
=
"rsCategoryBlue"
/>
</
ResourceStyles
>
<
AppointmentTemplate
>
<
img
src='<%# "../Images/Schedule" + Eval("ActType") +".gif" %>' alt=" " title='<%# Eval("ActType") %>' />
<
asp:Label
ID
=
"lblSubject"
runat
=
"server"
Text='<%# Eval("Subject") %>' />
<%--Text='<%# (Convert.ToString(Eval("Subject")).Length > 10) ? Convert.ToString(Eval("Subject")).Substring(0,10) : Eval("Subject") %>'--%>
</
AppointmentTemplate
>
<
TimeSlotContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"SchedulerTimeSlotContextMenu"
>
<
Items
>
<
telerik:RadMenuItem
Selected
=
"true"
Text
=
"Schedule a meeting"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
Text
=
"Schedule a call"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
Text
=
"Schedule a task"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
IsSeparator
=
"true"
/>
<
telerik:RadMenuItem
Selected
=
"true"
Text
=
"Un-Scheduled activities"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Create a meeting"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
Text
=
"Make a call"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
Text
=
"Create a task"
Value
=
"CommandAddAppointment"
/>
</
Items
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
IsSeparator
=
"true"
/>
<
telerik:RadMenuItem
Text
=
"Go to today"
Value
=
"CommandGoToToday"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
TimeSlotContextMenus
>
<
AppointmentContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"SchedulerAppointmentContextMenu"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Edit"
Value
=
"CommandEdit"
/>
<
telerik:RadMenuItem
IsSeparator
=
"True"
/>
<
telerik:RadMenuItem
Text
=
"Export to iCal"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
AppointmentContextMenus
>
<
AdvancedInsertTemplate
>
<
Scheduler:AdvancedForm
runat
=
"server"
ID
=
"ucAdvForm_Insert"
Mode
=
"Insert"
Subject='<%# Bind("Subject") %>'
Description='<%# Bind("Description") %>' ActType="Meeting" Start='<%# Bind("Start") %>'
End='<%# Bind("End") %>' ContactIDs='<%# Bind("ContactIDs") %>' />
</
AdvancedInsertTemplate
>
<
AdvancedEditTemplate
>
<
Scheduler:AdvancedForm
runat
=
"server"
ID
=
"ucAdvForm_Edit"
Mode
=
"Edit"
Subject='<%# Bind("Subject") %>'
Description='<%# Bind("Description") %>' ActType="Meeting" Start='<%# Bind("Start") %>'
End='<%# Bind("End") %>' ContactIDs='<%# Bind("ContactIDs") %>' />
</
AdvancedEditTemplate
>
</
telerik:RadScheduler
>
In cs file
protected void schActivities_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
{
//code
}
protected void schActivities_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
}
but i wasn't been able to get resources values in insert event. actually in my scheduler there are three kind of appointment "Meeting", "Call", "Task" and i need to set the Activity Type on insert command, but i can't find it through resources. Please help me in this.
Regards
Manmeet Singh