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

RadScheduler

1 Answer 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mouse
Top achievements
Rank 1
Mouse asked on 16 Dec 2010, 04:09 PM

Hi Everyone,

I would like to ask two questions about the Scheduler.
1. I may just be a bit silly here but i cant seem to find the event handler for the save button on the default advanced form?

2. I have a database with a value 1 to 5. In my code i have resources like so

 

<

 

ResourceStyles
    <telerik:ResourceStyleMapping Type="Calendar" Text="example" ApplyCssClass="rsCategoryBlue" /> 
    <telerik:ResourceStyleMapping Type="Calendar" Text="example1" ApplyCssClass="rsCategoryOrange" /> 
    <telerik:ResourceStyleMapping Type="Calendar" Text="example2" ApplyCssClass="rsCategoryGreen" /> 
    <telerik:ResourceStyleMapping Type="Calendar" Text="example3" ApplyCssClass="rsCategoryRed" /> 
    <telerik:ResourceStyleMapping Type="Calendar" Text="example4" ApplyCssClass="rsCategoryYellow" />
</ResourceStyles>

I have copied most of this code from an online example and modified it for my needs. The example came with a context menu fully functioning with the option to change appointments background colour using resources

 

 

 

 

<

 

Items
    <telerik:RadMenuItem Text="Open" Value="CommandEdit" /> 
    <telerik:RadMenuItem IsSeparator="True" /> 
    <telerik:RadMenuItem Text="Appointment Type"> 
    <Items
        <telerik:RadMenuItem Text="example" Value="1" /> 
        <telerik:RadMenuItem Text="example1" Value="2" /> 
        <telerik:RadMenuItem Text="example2" Value="3" /> 
        <telerik:RadMenuItem Text="example3" Value="4" /> 
        <telerik:RadMenuItem Text="example4" Value="5" /> 
    </Items
    </telerik:RadMenuItem
    <telerik:RadMenuItem IsSeparator="True" /> 
    <telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="Images/delete.gif" />
</Items>

 

 

 

var selectedAppointment = null;
var contextMenuSlot = null;
//Called when the user clicks an item from the appointment context menu
function appointmentContextMenuItemClicking(sender, eventArgs) {
var clickedItem = eventArgs.get_item();
if (clickedItem.get_text() == "Appointment Type") {
//Prevent the menu from closing if the user clicked the "Categorize" menu item
eventArgs.set_cancel(true);
return; }

 

 

}



This code works and changes the colour of my appointments perfectly. But i am having a problem setting the variables from my database to the appointment to give it the correct resource. I would much appreciate any help

Thanks

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Mouse
Top achievements
Rank 1
answered on 16 Dec 2010, 05:18 PM
Hi

I have now found the event handler for the advanced form save button

For people who are interested it is

 

protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)

 



But i still would like help on my second point.

Thanks
Tags
Scheduler
Asked by
Mouse
Top achievements
Rank 1
Answers by
Mouse
Top achievements
Rank 1
Share this question
or