More in this section
Forums / Sitefinity SDK / Get Content Provider of Content Item

Get Content Provider of Content Item

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
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:
    12 Sep 2017
    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