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

Forums / General Discussions / Poll questions

Poll questions

2 posts, 0 answered
  1. Rene
    Rene avatar
    25 posts
    Registered:
    02 Feb 2009
    02 Apr 2010
    Link to this post
    Hi,

    I want to include a poll on a page, but only for a certain period. Is there a possibility for this? In the poll module I miss the publication start and publicatie end date.

    And another question. Is it possible to only show the results of a poll, not the questions? This could be interesting if the poll ended and you only want to show the results.

    Hope you guys could help me, thanks.

    Rene
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Apr 2010
    Link to this post
    Hi Rene,

    1. The control has a visible property that you could set to false when you want to remove the poll. You could also implements some logic that switches the item id on a timely basis without making any changes manually. The polls item does not have publication and expiration date.  If you want to implement them you will need to override PollItemNew view and PollItemEdit where you need to add your persistence logic. The module is not Generic Content based, which will not allow you to use the dynamic metakeys.

    2. You can do this by creating a custom control that inherits from PollBox and expose a public boolean type property as shown below

    public class PollBoxCustom : PollBox
    {
        public PollBoxCustom()
        {
     
        }
     
        protected override void ShowResultsBox()
        {
            if (HideVoteView)
            {
                this.IsResultsBoxRendered = true;
            }
            else
            {
                base.ShowResultsBox();
            }
        }
     
        public bool HideVoteView
        {
            get
            {
                object obj = (object)ViewState["HideVoteView"];
                return obj == null ? false : (bool)obj;
            }
            set
            {
                ViewState["HideVoteView"] = value;
            }
        }
     
    }


    Regards,
    Ivan Dimitrov
    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