RadCalender ability to click an event?

2 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    1 posts
    Member since:
    Aug 2016

    Posted 25 Aug 2016 Link to this post

    Hi Guys

    I am working on a universal app, my requirement is load the events to the calendar and have the ability to go to do a task when the user click a particular event.

    I have looked through the documentation but could not see help on this. Does this control support this functionality?

    If yes, can you provide a sample?




  2. Lance | Tech Support Engineer, Sr.
    Lance | Tech Support Engineer, Sr. avatar
    459 posts

    Posted 25 Aug 2016 Link to this post

    Hello Ramesh,

    There is a SelectionChanged event and also a CellTap command, depending on whether you want an MVVM scenario or code-behind scenario.

    As an example, I'll use the SelectionChanged event (you can find how to use the CellTap command here).

    Note: Events is the DataSource that is bound to the Calendar:

    ObservableCollection<EventInfo> Events => new ObservableCollection<EventInfo>()
        new EventInfo() {Date = DateTime.Today.AddDays(2), Title = "Some Event", Details = "Some Details..."},
        new EventInfo() { Date = DateTime.Today.AddDays(3), Title = "Other Event", Details = "Other Details..." }
    private void RadCalendar_OnSelectionChanged(object sender, CurrentSelectionChangedEventArgs e)
         var selectedDate = e.NewSelection;
         IEnumerable<EventInfo> eventsOnTheSelectedDay = Events.Where(evnt => evnt.Date == selectedDate);

    You now have all the events, or tasks, that are listed on the selected day on the calendar in eventsOnTheSelectedDay.

    Lance | Tech Support Engineer, Sr.
    Telerik by Progress
    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 Feedback Portal and vote to affect the priority of the items
Back to Top