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

Get TimeSlotContextMenuItem Parent\Owner text\value

1 Answer 29 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
codispdp
Top achievements
Rank 1
codispdp asked on 14 May 2010, 03:50 PM
I am trying to determine if the MenuItem that was clicked is a child and if so what is the parent or owner value or text. I am using the server-side event  RadScheduler1_TimeSlotContextMenuItemClicking and am having difficulty getting it.

Protected Sub RadScheduler1_TimeSlotContextMenuItemClicking(ByVal sender As ObjectByVal e As Telerik.Web.UI.TimeSlotContextMenuItemClickingEventArgs) Handles RadScheduler1.TimeSlotContextMenuItemClicking  
        If e.MenuItem.Value = "EnableGrouping" Then 
            RadScheduler1.GroupBy = "Location" 
        ElseIf e.MenuItem.Owner.??? Then 
        Do Something  
 
        End If 
 
        UpdateScheduler()  
    End Sub 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 17 May 2010, 12:27 PM
Hi Codispdp,

Please, try the following code and let us know if you have further questions:

Protected Sub RadScheduler1_TimeSlotContextMenuItemClicking(sender As Object, e As TimeSlotContextMenuItemClickingEventArgs)
    If e.MenuItem.Level = 1 Then
        Response.Write("This is a root item")
    Else
        Response.Write("This is a child item")
        Dim parentItem As RadMenuItem = TryCast(e.MenuItem.Parent, RadMenuItem)
        Response.Write("And its parent item's value is: " + parentItem.Value)
    End If
End Sub


Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
codispdp
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or