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

triggerContextmenuitem click

2 Answers 103 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dick Arlbring
Top achievements
Rank 1
Dick Arlbring asked on 23 Apr 2010, 11:42 AM
Hi

I'm tryging to trigger some serverside code from my contextmenu, but it does not seem to work below is th server code
 Protected Sub RadScheduler1_AppointmentContextMenuItemClicked(ByVal sender As ObjectByVal e As Telerik.Web.UI.AppointmentContextMenuItemClickedEventArgs)  
        Dim strID As String 
        strID = e.Appointment.ID.ToString  
        Commonlib.SendToDick("bbb""")  
 
        Select Case e.MenuItem.Value  
            Case Is = "bek" 
                Response.Redirect("visadoc.aspx?doctyp=bek&bokningsid=" & strID)  
        End Select 
        If e.MenuItem.Value = "EnableGrouping" Then 
            RadScheduler1.GroupBy = "Calendar" 
        ElseIf e.MenuItem.Value = "DisableGrouping" Then 
            RadScheduler1.GroupBy = "" 
        End If 
    End Sub 

And here is parts of the clientcode
 <AppointmentContextMenus> 
            <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server">  
                <Items> 
                <telerik:RadMenuItem runat="server" Text="Ändra bokning" Value="andra">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem runat="server" Text="Skriv ut bekräftelse" Value="bek">  
                    </telerik:RadMenuItem> 
                     <telerik:RadMenuItem runat="server" Text="Skriv ut avtal" Value="avt">  
                    </telerik:RadMenuItem> 
                  
                     
                </Items> 
            </telerik:RadSchedulerContextMenu> 
        </AppointmentContextMenus> 
 

/Kind Regrards,
Dick

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 23 Apr 2010, 12:22 PM

Hello Dick Arlbring,

I am not sure about the problem in your end. The 'OnAppointmentContextMenuItemClicked' event in my application is worked fine when I tried your code.

Have you attached the 'OnAppointmentContextMenuItemClicked' event to RadScheduler?

ASPX:

 
<telerik:RadScheduler StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="true"  
    ID="RadScheduler1" Skin="Outlook" runat="server" DataEndField="End" DataKeyField="ID"  
 
    OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"

Could you provide some more information about the RadScheduler code that you tried, if this does not help?

-Shinu.

0
Dick Arlbring
Top achievements
Rank 1
answered on 23 Apr 2010, 12:42 PM
Thank you, I missed that one (OnAppointmentContextMenuItemClicked).

Kind Regards,
Dick
Tags
Scheduler
Asked by
Dick Arlbring
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Dick Arlbring
Top achievements
Rank 1
Share this question
or