RadCalendarView: Displaying events in the calendar

RadCalendarView can be used to display the events for a single cell, that is currently selected. There are currently two ways for displaying the events, which are being set by using a single property of the calendar.

Inline events

In this mode the calendar will crack open below the selected cell and will display the events as a scrollable list, which will fill the entire width of the calendar. The height will be determined by the height and the number of events, that need to be displayed. It will however be limited to the height of 4 calendar rows.

    calendarView.EventsDisplayMode = EventsDisplayMode.Inline;


In this mode the events will be displayed as a popup window, which will load at most four of the cell's events inside a list view and will take place at the lower part of the cell's location.

    calendarView.EventsDisplayMode = EventsDisplayMode.Popup;


Please note that both modes are only available when using Single selection mode. An exception will be thrown otherwise.

In both modes it is valid that all scrolling will be disabled and only selections will be permitted. Once the events are no longer displayed the calendar will restore its original behaviour. Switching to year display mode is possible, but the events will be closed first, and then the switching will perform.

Displaying Events Programmatically

You can programmatically show or hide events for a specific date/cell by using the following two methods:

You can additionally check if events are shown for a specific date/cell by using the following methods:

Customizing the display of the events

Customization is being done using the calendar adapter for both modes. The properties for the two modes are different and are as follows:

If this is not enough, you can further customize the events by setting a new adapter which extends ArrayAdapter for the inline events. Here's an example which shows how to use a single view to show both start and end time of an event:

public class MyInlineEventsAdapter extends ArrayAdapter<EventsManager.EventInfo> {
    private LayoutInflater layoutInflater;

    public MyInlineEventsAdapter(Context context) {
        super(context, R.layout.custom_inline_event_layout);
        this.layoutInflater = (LayoutInflater) context.

    public View getView(int position, View convertView, ViewGroup parent) {

        View view = convertView;
        ViewHolder holder;

        if (view == null) {
            view = layoutInflater.inflate(
                    R.layout.custom_inline_event_layout, parent, false);

            holder = new ViewHolder();
            holder.eventTitle = (TextView) view.findViewById(R.id.event_title);
            holder.eventTime = (TextView) view.findViewById(R.id.event_time);

        } else {
            holder = (ViewHolder) view.getTag();

        EventsManager.EventInfo eventInfo = getItem(position);
        Event event = eventInfo.originalEvent();
        String eventTime = String.format("%s - %s",
                eventInfo.startTimeFormatted(), eventInfo.endTimeFormatted());

        return view;

    class ViewHolder {
        TextView eventTitle;
        TextView eventTime;
public class MyInlineEventsAdapter : ArrayAdapter
    private LayoutInflater layoutInflater;

    public MyInlineEventsAdapter(Context context)
        : base(context, Resource.Layout.custom_inline_event_layout)
        this.layoutInflater = LayoutInflater.From(context); ;

    public override View GetView(int position, View convertView, ViewGroup parent)
        View view = convertView;
        ViewHolder holder;

        if (view == null)
            view = layoutInflater.Inflate(
                Resource.Layout.custom_inline_event_layout, parent, false);

            holder = new ViewHolder();
            holder.eventTitle = (TextView)view.FindViewById(Resource.Id.event_title);
            holder.eventTime = (TextView)view.FindViewById(Resource.Id.event_time);

            view.Tag = holder;
        else {
            holder = (ViewHolder)view.Tag;

        EventsManager.EventInfo eventInfo = (EventsManager.EventInfo)GetItem(position);
        Event event1 = eventInfo.OriginalEvent();
        holder.eventTitle.SetTextColor(new Color(event1.EventColor));
        holder.eventTitle.Text = event1.Title;
        String eventTime = String.Format("{0} - {1}", 
                                         eventInfo.StartTimeFormatted(), eventInfo.EndTimeFormatted());
        holder.eventTime.Text = eventTime;

        return view;

    class ViewHolder : Java.Lang.Object
        public TextView eventTitle;
        public TextView eventTime;

This example is using a resource file with the following content:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"


        android:textSize="18sp" />


You can use an instance of the new adapter and set it to your calendar's event manager:

MyInlineEventsAdapter adapter = new MyInlineEventsAdapter(getContext());
MyInlineEventsAdapter adapter = new MyInlineEventsAdapter(Context);
calendarView.EventsManager().Adapter = adapter;

Please note that the event manager exists only when the calendar's EventDisplayMode is Inline or Popup.

Handling event clicks

If you need to display additional information about events, you can listen for item clicks. Here's an example to show a toast that an event is clicked:

    calendarView.eventsManager().setOnItemClickListener(new AdapterView.OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Toast.makeText(getContext(), parent.getAdapter().getItem(position).toString() + 
                " clicked!", Toast.LENGTH_SHORT).show();
calendarView.EventsManager ().SetOnItemClickListener (new MyClickListener());

public class MyClickListener : Java.Lang.Object, AdapterView.IOnItemClickListener {
    public void OnItemClick (AdapterView parent, View view, int position, long id)
        Toast.MakeText (parent.Context, (((ArrayAdapter)((ListView)parent).Adapter)).
            GetItem(position).ToString(), ToastLength.Short).Show ();