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

Forums / Developing with Sitefinity / how to hide some folders from file tab(page selector)?

how to hide some folders from file tab(page selector)?

4 posts, 0 answered
  1. humayoo
    humayoo avatar
    89 posts
    Registered:
    25 Oct 2010
    01 Jun 2011
    Link to this post
    hi,

    when page selector open, there is two tab  page and file , when files tab click ,it shows all folder of project.i want  to hide some folders from file tab. how can we do that ? please guide me ,how to solve this problem?

    please see the attachment for clarity.

    thanks
    Humayoo
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Jun 2011
    Link to this post
    Hi humayoo,

    1. You need to create a custom class that inherits from UrlWebEditor. You need to override Value property and populate the control with the data you want.

    2.You need to replace the default UrlWebEditor with UrlWebEditorCustom inside


    Sitefinity\Admin\ControlTemplates\Pages\Dialogs\PagesSelector.ascx

    <cc:UrlWebEditor id="urlWebEditor" runat="server" /></div>

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. humayoo
    humayoo avatar
    89 posts
    Registered:
    25 Oct 2010
    01 Jun 2011
    Link to this post
    HI,

    i did as you said, it working fines . i addedthis.manageFiles.SelectedFolder = "~/test"; where test is folder in project folder. i want that "folder up button " is disabled when test folder is selected.

    using System;
    using System.Collections.Generic;
    using System.Text;
    using Telerik.Cms.Web.UI;
    using System.Drawing.Design;
    using System.IO;
    using System.Web.UI.HtmlControls;
    using Telerik.FileManager;
    using Telerik.FileManager.WebControls;
    using System.Web;
    using System.Security.AccessControl;
     
    /// <summary>
    /// Summary description for UrlWebEditorCustom
    /// </summary>
    namespace Telerik.FileManager.Custom
    {
        public class UrlWebEditorCustom : Telerik.FileManager.UrlWebEditor
        {
            public UrlWebEditorCustom()
            {
                //
                // TODO: Add constructor logic here
                //
            }
     
            protected override void CreateChildControls()
            {
     
                this.Controls.Clear();
                 
                DirectoryInfo a = new DirectoryInfo(HttpContext.Current.Server.MapPath("~/test/"));           
                this.manageFiles = new ManageFiles();
                // here get the RadGrid from files grid collection and set its page size
                FilesGrid fg = manageFiles.Controls[1] as FilesGrid;
                 
                fg.SelectedFolderName = a.Name;
                fg.DataBind();
                 
                // get the container
                var rd = fg.Controls[2];
                // get the radgrid
                Telerik.Web.UI.RadGrid radgridid = ((Telerik.Web.UI.RadGrid)rd.Controls[0]);
                //radgridid.PageSize = 3;           
                 
                 
                this.manageFiles.SelectedFolder = a;
                this.manageFiles.DataBind();
                 
                this.manageFiles.SetFilesGridColumnVisibility(false, false, false);
     
                this.Controls.Add(this.manageFiles);
            }
     
            
     
     
           
            private ManageFiles manageFiles;
     
     
        }
    }

    please  guide me how to accomplish this task. please see the attachment.

    thanks
    Humayoo
  4. humayoo
    humayoo avatar
    89 posts
    Registered:
    25 Oct 2010
    03 Jun 2011
    Link to this post
    HI,

    i am waiting for your reply. its very urgent.

    thanks
Register for webinar
4 posts, 0 answered