ContentView Example - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

ContentView Example

  • ContentView Example
  • 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
  • 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 >>
  • 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.
  • Hi,

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

    www.sitefinity.com/.../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 >>