We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to get data source from SfCalendar_InlineEventToggled(object sender, SfCalendar.InlineEventToggledEventArgs e)

I tried this way to get data source but got nothing in return

 private void SfCalendar_InlineEventToggled(object sender, SfCalendar.InlineEventToggledEventArgs e)
        {
            // build and show alert dialog
         
            var argument = e.P0;
          var startDate=argument.????
// I need tapped event's data including subject., startdate..... but how to get
        }

1 Reply

ET Eswaran Thirugnanasambandam Syncfusion Team September 22, 2017 12:05 PM UTC

Hi Ishwor Khanal,

Thanks for contacting Syncfusion Support

Query 1: How to get data source from SfCalendar_InlineEventToggled

The data source can be obtained from the “e.P1” and it is the CalendarEventCollection. Get method is used to get the datasource from the CalendarEventCollection which is shown in the below code. 
  
private void SfCalendar_InlineEventToggled(object sender, SfCalendar.InlineEventToggledEventArgs e)
{
      app = new List<CalendarInlineEvent>();
      for (int i = 0; i < e.P1.Size();i++)
      {
              app.Add(e.P1.Get(i) as CalendarInlineEvent);
      }
}
  
 Query2: I need tapped event's data including subject., startdate..... but how to get

We have created a sample to meet your reported requirement. In this sample we have created custom Text view which has a property Appointment( to hold CalendarInlineEvent Data) and ItemClicked event. We have use this custom text view to create custom view for each appointment in SelectedDate. So whenever we tap the custom text view it will fire the Item clicked event with respective appointment details. Please find the sample from the below link.

Link: http://www.syncfusion.com/downloads/support/forum/132793/ze/Calendar1327931830201464  

Please let us know if you have any other query.

Regards,
Eswaran AT.  


Loader.
Live Chat Icon For mobile
Up arrow icon