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

Forums / Sitefinity SDK / ContentView Example

ContentView Example

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:
    09 Dec 2016
    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:
    09 Dec 2016
    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