More in this section

Forums / Developing with Sitefinity / Custom Designer for DownloadList ignoring the FilterExpression setup

Custom Designer for DownloadList ignoring the FilterExpression setup

3 posts, 0 answered
  1. Lucas
    Lucas avatar
    65 posts
    Registered:
    22 Mar 2010
    08 Jun 2010
    Link to this post
    Hi,

    I'm having troubles with a custom DownloadList (custom code behind, custom template and custom designer), which displays all items in the library regardless of the items I check in the Designer setup: this setup doesn't look like it's being persisted in the database at all (others, like which columns are displayed, do).

    The FilterExpression property stays empty when I save, and if I edit it manually, the control behaves as expected but the wizard will still have the option "Items from all libraries" set.

    In fact, I don't really know where to start debugging (I don't really get how the configuration is persisted).

    I have tried reverting to the original file, Sitefinity_3_7_2096_standard_trial_ExternalTemplates\Sitefinity\Admin\ControlTemplates\Libraries\DownloadListControlDesigner.ascx but I have the same problem.

    Do you have any pointers ?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Jun 2010
    Link to this post
    Hi Lucas,

    How do you persist these values? If have not created a custom control that inherits from DownloadList and you just have a code behind the settings will not be persisted, because they are override by the base class.

    Greetings,
    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.
  3. Lucas
    Lucas avatar
    65 posts
    Registered:
    22 Mar 2010
    08 Jun 2010
    Link to this post
    Hi,

    after poking around, I found that my designer class derived from ContentViewDesignerBase and not DownloadListDesigner (as was suggested by Working with ContentView designer (part 4): Introduction :) )

    This is probably the root cause (now I have to recheck I am not missing something). My designer code is now

    public class DownloadListDesigner : Telerik.Libraries.WebControls.Design.DownloadListDesigner
    {
     
        public override string DesignerTemplatePath
        {
            get
            {
                if (ViewState["DesignerTemplatePath"] == null)
                    return "~/UserControls/Documents/DownloadList/Designers/ControlDesigner.ascx";
                return ViewState["DesignerTemplatePath"] as string;
            }
            set
            {
                ViewState["DesignerTemplatePath"] = value;
            }
        }
        public override string DesignerTemplateName
        {
            get
            {
                return String.Empty;
            }
        }
     
     
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
        }
    }

    I probably have broken something else while poking around, though :(


Register for webinar
3 posts, 0 answered