+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Get Content Provider of Content Item

Get Content Provider of Content Item

3 posts, 1 answered
  1. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    21 Mar 2011
    Link to this post
    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.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Mar 2011
    Link to this post
    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
    Answered
  3. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    21 Mar 2011
    Link to this post
    Exactly what I was looking for.  Thank you again, Ivan.
3 posts, 1 answered