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

Forums / Developing with Sitefinity / Modify event module

Modify event module

21 posts, 0 answered
  1. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    30 Oct 2009
    Link to this post
    Hi,

    I'm new to Sitefinity and try to create Training module.
    I do not have much knowledge on Sitefinity , so please bear with me.

    Training will have one or more courses in it, and each course will have one or more than session based on location or date. (Training -> Courses -> Sessions)
    So, if you drill into Training module you will see course list and if you drill into any course, there will be session list.
    Session will inherit existing Event module due to similarity of its functionality.
    I Could implement training sessions by extending and inheriting Event module.
    However, I have no idea how to map sessions with course and training.

    I thought I could use some functionality from Image&Documents module since it has got similar pattern. (Image&Documents -> Libraries -> Items)
    But I have no idea how it should be implemented and it is hard for me to work around with the source code.
    Please give me some detailed advice.

    Thanks,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Oct 2009
    Link to this post
    Hi Rick,

    You should create a new Generic Content based module. You can find sample in this blog post. You should also generate. You should also generate the CommandPanel commands manually.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    03 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks for your advice.
    I implemented Training module showing training session lists.
    I added additional metafields but after doing this "create" button does not work.
    What did I do wrong? 

    ----- Source Code deleted by Rick for the purpose of saving space :) ------

    Thanks,
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Nov 2009
    Link to this post
    Hello Rick,

    Are there any js or other errors thrown? What do you mean by "create button does not work." Can you send a link form where we could download the module?

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    05 Nov 2009
    Link to this post

    Hi Ivan,

    Don't worry about above question about "Button".
    That was a simple misunderstanding from me.

    However, I have another question.
    I downloaded the sample(Products) from the link you put up on Oct 30.

    Obviously, when I create any item, it looks like it is stored in Sitefinity database.

    If I want to create another database for Products module and store data in it, what do I need to do?

     

    Thanks,

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    05 Nov 2009
    Link to this post
    Hi Rick,

    If I want to create another database for Products module and store data in it, what do I need to do?

    The provider for products module has connectionStringName property which you can set. There you should have Sitefintity database installed and the same tables.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    06 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks for the reply.
    Let me make my question clear.

    Let's say I want to create Training Course view and create Training Session view for each course.
    It will look like this :

    - Mining training course
            - Mining site safety session
            - Geology for non-geologist session
            - Open pit mine session

    I implemented a new custom module called Training based on Generic Content Based Module (Sample Product)
    I was able to create session level and manually created command panel.
    However, I could not create course level and associate with session level because every content in Training module is stored in "sf_CmsContentBase" table with the application name of "/Training" by Sitefinity.
    So, I thought I might be able to associate session and course if I have separate tables for both session and course.

    Basically, my structure of Training module will be like existing Forum module, but having different functionality and separate database for the module. 
    To be honest, I am not even sure if this is feasible or not.
    Please guide me to the right direction.

    Thanks,


  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 Nov 2009
    Link to this post
    Hello Rick,

    It will not be possible to associate course and session level using the basic Generic Content implementation. To link the views you need to create a new DataProvide for Training course, separate persistence classes for courses. You can keep using generic content based module for Training Session. The provider you need to create should implement methods and functions for working with data on a database level.

    From Sitefinity 4.0 we will have Taxonomy and similar implementation will be achieved with minimum efforts.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    09 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks again for helping me.

    Do I have to create a project for data layer?
    Can I use Linq for my data layer?
    Please let me know how to achieve Course level step by step.

    And I am just wondering how Blog module is implemented.
    By looking at it, it looks like it has 2 levels (Blog item level, Post item level) and inheriting from Generic Content based module.

    Thanks :)
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Nov 2009
    Link to this post
    Hi Rick,


    Do I have to create a project for data layer?
    Can I use Linq for my data layer?
    Please let me know how to achieve Course level step by step.


    You can use Linq or OpenAccess ORM. You may find the following articles useful - Working with Data in Sitefinity

    And I am just wondering how Blog module is implemented.
    By looking at it, it looks like it has 2 levels (Blog item level, Post item level) and inheriting from Generic Content based module.


    It is implemented by using manually generated command panels  - the link I sent you shows the actual implementation that we use, but in your case you do not have interface as IBlog that is parent ID of content items and this is why you need to implement custom data classes.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    13 Nov 2009
    Link to this post
    Hi Ivan,

    I really appriciate what you have told me so far.
    Unfortunately, I do not know much about Sitefinity and Linq.
    Also, the article you provided is explained in the way of Intra-site module while I have implemented Training module as pluggable.

    I think I do not fully understand what you explained in terms of Provider.
    Could you please give me more detailed instruction on achieving Training course level?

    Thanks,
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 Nov 2009
    Link to this post
    Hello Rick,

    The ways that you can use are:

    1.Creating a new provider for blogs and use its implementation.
    2. Creating a new module and making relation based on ParentIDs.
    3. Creating a new data provider as suggested in the last post.
    You can take a look at the implementation of the following modules:

    Sample intra site module: Contacts intra site module
    Sample pluggable module: Contacts pluggable module

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  13. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    17 Nov 2009
    Link to this post

    Hi Ivan,

    I think I am getting familiar with this.
    I tried to use option 3. Creating a new data provider as suggested in the last post.

    I added this code in web.config

    <training defaultGenericProvider="Training">  
          <genericContentProviders> 
            <add providerName="Training" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" urlDateTimeFormat="yy-MM-dd"/>  
          </genericContentProviders> 
          <providers> 
            <add name="TrainingCourse" type="Snowden.Training.TrainingProvider" visible="true" /> 
          </providers> 
        </training> 

    And I also modified TraininigManger.cs to be inherited from ManagerBase, then implemented some abstract properties and method.
    public class TrainingManager : ManagerBase<TrainingProvider> 
        {  
            public override string DefaultProvider  
            {  
                get  
                {  
                    return ConfigHelper.Handler.DefaultContentProvider;  
                }  
            }  
     
            public override string ModuleName  
            {  
                get  
                {  
                    return Resources.Messages.Module_Name;  
                }  
            }  
     
            protected override ProviderSettingsCollection ProvidersSettings  
            {  
                get  
                {  
                    return ConfigHelper.Handler.Providers;  
                }  
            }  
     
            #region Constructors  
     
            /// <summary> 
            /// Provides a static constructor of TrainingManager class.  
            /// </summary> 
            static TrainingManager()  
            {  
                foreach (GenericContentElement element in ConfigHelper.Handler.GenericContentProviders)  
                    TrainingManager.contentSettings.Add(element.ProviderName, element);  
            }  
     
            /// <summary> 
            /// Initializes a new instance of ProductsManager class for a specified provider name.  
            /// </summary> 
            /// <param name="providerName">the name of the provider used with this instance of ProductsManager.  
            /// </param> 
            public TrainingManager(string providerName)  
            {  
                if (string.IsNullOrEmpty(providerName))  
                    providerName = DefaultContentProvider;  
                this.settingsElement = TrainingManager.contentSettings[providerName];  
     
            }  
     
            #endregion  
     
            #region Properties  
     
            /// <summary> 
            /// Gets key/value information for provider/global permissions. Preserves information  
            /// for all providers.  
            /// </summary> 
            public static Dictionary<String, ISecured> SecurityRoots  
            {  
                get  
                {  
                    if (securityRoots == null)  
                    {  
                        securityRoots = new Dictionary<String, ISecured>(ContentManager.Providers.Count);  
                        foreach (string name in contentSettings.Keys)  
                            securityRoots.Add(name, new GlobalPermissions(name));  
                    }  
                    return securityRoots;  
                }  
            }  
     
            /// <summary> 
            /// Gets default provider used by news manager.  
            /// </summary> 
            public static string DefaultContentProvider  
            {  
                get  
                {  
                    return ConfigHelper.Handler.DefaultContentProvider;  
                }  
            }  
     
            /// <summary> 
            /// Gets manager responsible for working with news content.  
            /// </summary> 
            public ContentManager Content  
            {  
                get  
                {  
                    if (this.contentManager == null)  
                        this.contentManager = new ContentManager(this.settingsElement.ProviderName);  
                    return this.contentManager;  
                }  
            }  
     
            #endregion  
     
            #region Security Members  
     
            /// <summary> 
            /// Gets the permissions for the current provider.  
            /// </summary> 
            public GlobalPermissions Permissions  
            {  
                get  
                {  
                    return (GlobalPermissions)TrainingManager.SecurityRoots[this.settingsElement.ProviderName];  
                }  
            }  
     
            /// <summary> 
            /// Gets GlobalPermission object for the secured object.  
            /// </summary> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission()  
            {  
                return new GlobalPermission(this.Permissions);  
            }  
     
            /// <summary> 
            /// Gets the current provider permissions for the specified rights.  
            /// </summary> 
            /// <param name="requestRights">the requested rights to check permissions for</param> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission(int requestRights)  
            {  
                return new GlobalPermission(this.Permissions, requestRights);  
            }  
     
            /// <summary> 
            /// Gets the current provider permissions for the specified content owner identifier.  
            /// </summary> 
            /// <param name="contentOwnerId">the identifier of the content's owner</param> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission(Guid contentOwnerId)  
            {  
                IContent cnt = this.Content.GetCurrentState(contentOwnerId);  
                return this.GetPermission(cnt);  
            }  
     
            /// <summary> 
            /// Gets information for the current provider permissions for the specified  
            /// content owner ID and rights.  
            /// </summary> 
            /// <param name="contentOwnerId">the identifier of the content's owner</param> 
            /// <param name="requestRights">the requested rights to check permissions for</param> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission(Guid contentOwnerId, int requestRights)  
            {  
                IContent cnt = this.Content.GetCurrentState(contentOwnerId);  
                return this.GetPermission(cnt, requestRights);  
            }  
     
            /// <summary> 
            /// Gets the current provider permissions for the specified owner of the content.  
            /// </summary> 
            /// <param name="contentOwner">the owner of the content</param> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission(IContent contentOwner)  
            {  
                return new GlobalPermission(this.Permissions, contentOwner);  
            }  
     
            /// <summary> 
            /// Gets the current provider permissions for the specified  
            /// content owner and rights.  
            /// </summary> 
            /// <param name="contentOwner">the owner of the content</param> 
            /// <param name="requestRights">the requested rights to check permissions for</param> 
            /// <returns>GlobalPermission object</returns> 
            public GlobalPermission GetPermission(IContent contentOwner, int requestRights)  
            {  
                return new GlobalPermission(this.Permissions, requestRights, contentOwner);  
            }  
     
            #endregion  
     
            #region Methods  
     
            public IList GetTrainingCourses()  
            {  
                return this.Provider.GetTrainingCourses();  
            }  
     
            #endregion Methods  
     
            #region Private Fields  
     
            private readonly GenericContentElement settingsElement;  
            private ContentManager contentManager;  
            private static Dictionary<String, ISecured> securityRoots;  
     
            private static readonly IDictionary<string, GenericContentElement> contentSettings = new Dictionary<string, GenericContentElement>();  
     
            #endregion Private Fields  
     
        } 

    This is TrainingProvider.cs
    public class TrainingProvider : ProviderBase     
        {     
            #region Methods     
        
            public IList GetTrainingCourses()     
            {     
                // Set up connection string     
                string connectionString = @"     
                    server = sptv1;     
                    integrated security = true;     
                    database = SnowdenWebsite;     
                ";     
        
                // Create data context     
                DataContext db = new DataContext(connectionString);     
        
                // Query database     
                //Table<TrainingCourse> trainingCourses = db.GetTable<TrainingCourse>();     
                var courses =     
                    from c in db.GetTable<TrainingCourse>()     
                    select c;     
        
                return courses.ToList();     
            }     
        
            #endregion Methods     
        }    
     

    However, after debugging, I got this exception. (Refer to the attached file)

    Please let me know if I'm on the right track and how to get this working.

    Thanks,
  14. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Nov 2009
    Link to this post
    Hi Rick,

    1. In <sectionGroup> node you need to register your module Configuration.SectionHandler
    2. Register the module under <modules> node.
    3. The code you use does not inherits from GenericContent base classes, but you register the provider as GenericContent based, so you should register the provider as shown below:

    <training defaultProvider="YOUR DEFAULT PROVIDER">
                <providers>
                    <clear />
                    <add name="SOME NAME" connectionStringName="YOUR CONNECTION" type="YOUR TYPE HERE. NOTE THAT THIS SHOULD BE A DATA PROVIDER" />
                </providers>
    </polls>

    Also you should add a data provider and the syntax is type="NAMESPACE, ASSEMBLY"


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  15. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    18 Nov 2009
    Link to this post

    Hi Ivan,

    Thanks for the reply.

    I have already done step1, 2 and have a question on 3.

    3. The code you use does not inherits from GenericContent base classes, but you register the provider as GenericContent based, so you should register the provider as shown below:

     - I have Training provider inheriting from GC based module, and also need to have another provider for Training course. So I added like this

    <training defaultGenericProvider="Training">  
          <genericContentProviders> 
            <add providerName="Training" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" urlDateTimeFormat="yy-MM-dd"/>  
          </genericContentProviders> 
          <providers> 
            <add name="TrainingCourse" type="Snowden.Training.TrainingProvider, Snowden.Training" visible="true" /> 
          </providers> 
        </training> 

    Is this wrong? Isn't this registering another data provider?
    I'm confused between Provider and Data provider.
     
    As for the data provider, could you let me know where and how to implement?

    Best regards,

  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    18 Nov 2009
    Link to this post
    Hello Rick,

    The contacts module has example of data provider implementation. Please download the module from the links I provided you and observe Sample.Contacts.Data class library(Sample pluggable module: Contacts pluggable module ).

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  17. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    18 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks for the quick reply.

    I took a look at Sample pluggable module: Contacts pluggable module before.
    But I need to use Linq rather than Nolics which that sample are using.
    Do you have any sample for data provider using linq?

    Thanks,
  18. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    18 Nov 2009
    Link to this post
    Hello Rick,

    I think I sent you the link in one of the previous posts - Custom modules, check Intra-Site Module with LINQ Provider. Here is a link to the official MSDN page where you can gather more information about LINQ.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  19. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    12 Jan 2010
    Link to this post

    Hi Ivan,

    I have been looking into this issue from the scratch.

    What I am trying to do is to make a module which has 2 views(Training course, Traing Session) using 2 providers.
    I have implemented Training session by inheriting and extending from Generic Content Based Modue.
    Now I am trying to implement Training course by creating a new data provider which is not inheriting from Generic Content Based Modue.

    I am wondering how I can set up 2 different providers for a module in Web.config and how I handle both providers in my TrainingManager class.
    I am confused if I need to inherit ManagerBase<my provider> in my TrainingManager class.

    Thanks,

     

     

  20. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 Jan 2010
    Link to this post
    Hello Rick,

    In the constructor of your manager you should have parameter that will be used to pass the provider name

    sample code for not GenericContent based module.

    public class CustomManager: ManagerBase<CustomModuleProvider>
       {
     
           #region Construction
           public CustomManager()
                   {
                
                   }
     
               public CustomManager(string providerName)
               : base(providerName)
                   {
                   }
     
           #endregion

    sample code for GenericContent based module

    public class CustomManager : ContentManager
       {
           #region Constructors
     
           static CustomManager ()
           {
               foreach (GenericContentElement element in ConfigHelper.Handler.GenericContentProviders)
               {
                   contentSettings.Add(element.ProviderName, element);
                   if (contentSettings[element.ProviderName] is IRssFeedProvider)
                       RssProviderService.Register(contentSettings[element.ProviderName].ProviderName, (IRssFeedProvider)contentSettings[element.ProviderName]);
               }
           }
     
           public CustomManager(string providerName)
           {
               if (string.IsNullOrEmpty(providerName))
               {
                   providerName = DefaultContentProvider;
               }
     
           }
     
           #endregion


    In both cases you can use var manager = new CustomManager("ProviderName");

    The providers for not GenericContent based modules should be registered between <telerik> tags of your web.config file

    You should have ConfigHelper class where you specify the location

    namespace Telerik.SAmples.Configuration
    {
        /// <summary>
        /// Helper class used to get a SectionHandler for List module in web.config
        /// </summary>
        public class ConfigHelper
        {
            private static SectionHandler handler =
                (SectionHandler)ConfigurationManager.GetSection("telerik/custom");
     
            /// <summary>
            /// Static property that returns Section Handler for List module.
            /// </summary>
            /// <value><see cref="SectionHandler"/> object.</value>
            public static SectionHandler Handler
            {
                get
                {
                    return handler;
                }
            }
        }
    }


    <custom defaultProvider="Sitefinity">
            <providers>
                <clear/>
                <add name="Sitefinity" securityProviderName="" type="Telerik.Samples.Data.DefaultProvider, Telerik.Samples.Data" connectionStringName="DefaultConnection" visible="true"/>
        <add name="Sitefinity2" securityProviderName="" type="Telerik.Samples.Data.DefaultProvider, Telerik.Samples.Data" connectionStringName="DefaultConnection" visible="true"/>
                 
            </providers>
        </custom >


    The providers for GenericContent based modules should be registered under
    <cmsEngine defaultProvider="Generic_Content"> section of your web.config file.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  21. Rick
    Rick avatar
    29 posts
    Registered:
    28 Oct 2009
    14 Jan 2010
    Link to this post

    Hi Ivan,

    I know I can set up 2 provider for News module which is Generic Content Based.
    I applied the same thing to my custom pluggable module(Training) as indicated here http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/adding-a-news-provider.aspx.

     <telerik> 
     
    ...  
        
       <cmsEngine defaultProvider="Generic_Content">  
          <providers> 
            <clear/> 
            <add name="Training" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="False" applicationName="/Training" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>  
            <add name="TrainingCourse" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="False" applicationName="/TrainingCourse" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>  
              
    ...  
     
     
          <metaFields> 
                
            <!-- custom fields for training--> 
            <add key="Training.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" mandatory="True"/>  
            <add key="Training.Street" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.City" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Country" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.State" valueType="ShortText" visible="True" searchable="True" sortable="False" defaultValue=""/>  
            <add key="Training.Contact_Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Contact_Email" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Contact_Phone" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Contact_Cell" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Contact_Web" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Registration_Contact_Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Registration_Contact_Email" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Registration_Contact_Phone" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Registration_Contact_Cell" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Registration_Contact_Web" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Associated_Project_Number" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_Start" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Session_End" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="Training.Expiration_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
     
            <add key="TrainingCourse.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" mandatory="True"/>  
            <add key="TrainingCourse.Street" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.City" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Country" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.State" valueType="ShortText" visible="True" searchable="True" sortable="False" defaultValue=""/>  
            <add key="TrainingCourse.Contact_Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Contact_Email" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Contact_Phone" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Contact_Cell" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Contact_Web" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Registration_Contact_Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Registration_Contact_Email" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Registration_Contact_Phone" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Registration_Contact_Cell" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Registration_Contact_Web" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Associated_Project_Number" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_Start" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Session_End" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <add key="TrainingCourse.Expiration_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>  
            <!-- custom fields for training--> 
          </metaFields> 
       
        <training defaultGenericProvider="Training">  
          <genericContentProviders> 
            <add providerName="Training" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" urlDateTimeFormat="yy-MM-dd"/>  
            <add providerName="TrainingCourse" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" urlDateTimeFormat="yy-MM-dd"/>  
          </genericContentProviders> 
        </training> 
     
    ...  
     
      </telerik> 
     

    However, I don't get to choose provider in my module.
    It alwasy passes default provider to Manager Class.
    Although I am using pluggable module, I thought I could use this method to keep Course level and Session level.
    Then I could use ParentId for their relationship.

    How can I achieve this?

    Thanks,

Register for webinar
21 posts, 0 answered