ContentView Example

Posted by Community Admin on 05-Aug-2018 22:50

ContentView Example

All Replies

Posted by Community Admin on 10-May-2011 00:00

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

Posted by Community Admin on 12-May-2011 00:00

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 >>

Posted by Community Admin on 12-May-2011 00:00

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.

Posted by Community Admin on 16-May-2011 00:00

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 >>

This thread is closed