More in this section
Forums / Sitefinity SDK / ContentView Example

ContentView Example

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.
4 posts, 0 answered
  1. Sonu Kapoor
    Sonu Kapoor avatar
    41 posts
    Registered:
    24 Apr 2006
    10 May 2011
    Link to this post
    Hi,

    Does anybody have a simple example on how to create a control that inherits from the ContentView control? I am looking for something like the news control, which can display the master/detail.

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 May 2011
    Link to this post
    Hello ,

    Here is a basic sample, but it depends on the final result you want to have

    public class NewsViewCustom : NewsView
    {
     
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
        }
     
        public override string MasterViewName
        {
            get
            {
                return base.MasterViewName;
            }
            set
            {
                base.MasterViewName = value;
            }
        }
     
        public override string DetailViewName
        {
            get
            {
                return base.DetailViewName;
            }
            set
            {
                base.DetailViewName = value;
            }
        }
    }


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. Sonu Kapoor
    Sonu Kapoor avatar
    41 posts
    Registered:
    24 Apr 2006
    12 May 2011
    Link to this post
    Thanks for the example. Here is what I did so far and what I need to achieve. I created a simple Article module, based on the Jobs module documentation. Now I would like to display the articles in the same way the newsview control does e.g: master/detail. I tried to create my module based on the products module, but did not had much luck. I can send you my project in a ticket if its easier to fix the problem.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 May 2011
    Link to this post
    Hi,

    Ok. Generally you should have MasterViewName and DetailViewName. Here is a similar thread

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/details-view-for-custom-module.aspx

    All the best,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

4 posts, 0 answered