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

Forums / Designing with Sitefinity / NewsView in a user control

NewsView in a user control

2 posts, 0 answered
  1. Eric Wallace
    Eric Wallace avatar
    66 posts
    Registered:
    08 Oct 2009
    26 May 2010
    Link to this post
    I've embedded a NewsView inside of a web user control. There is a public property in the code-behind to set the properties on the control named "newsView". What I am wondering is how can I get the full NewsView properties editor (with the Basic and Advanced tabs) to open just like an actual NewsView control? Is there some kind of attribute I can mark the property with? The goal here is to be able to select the categories in the "(1) Which news to display", and set some of the options in the "(3) News settings" panels on the Basic tab.

    [Attribute Class Here?]
    public
    NewsView NewsView
        {
            get
            {
                return this.newsView;
            }
            set
            {
                this.newsView = value;
            }
        }

    Thanks,
    Eric
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 May 2010
    Link to this post
    Hello Eric Wallace,

    Thank you for using our services.

    Unfortunately the result you are looking for is not present in the functionality out of the box. The Basic tab which you see on a regular News View control is a separate class - a control designer. This class interacts with the news view by setting its properties. What you can do would be to create your own control designer for your user control and make it set properties of the news view control. For example the categories selector is setting the FilterExpression property of News View by adding a filter for the selected categories. More information on how to create control designers can be found here.


    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered