Get Content Provider of Content Item

Posted by Community Admin on 05-Aug-2018 18:49

Get Content Provider of Content Item

All Replies

Posted by Community Admin on 21-Mar-2011 00:00

I have multiple content providers set up for my Events, allowing me to pull Events from multiple Sitefinity sites and aggregate them into a calendar for display.  Given one of these Events, is it possible to determine which content provider was used to obtain the Event?  I didn't see a property on the Event object that exposes its associated content provider.

I would like the content provider of the Event so I will be able to allow the user to edit the event and update properties associated with the event.

Thanks.

Posted by Community Admin on 21-Mar-2011 00:00

Hi Geoff,

Try to cast the Event to the IDAtaItem and get the provider

var prov = (myevent as IDataItem).Provider;

Best wishes,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 21-Mar-2011 00:00

Exactly what I was looking for.  Thank you again, Ivan.

This thread is closed