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

Forums / Developing with Sitefinity / how to change ItemsPerPage(pagesize) in File Tabs(generic content-document manager-files tab)?

how to change ItemsPerPage(pagesize) in File Tabs(generic content-document manager-files tab)?

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

    i posted two -three post about this topic but i did not get proper reply. from generic content->insert document-> file tab,
    which show all files from project. the item per page(page size) is 10(ten) default. i want to change this page size to 100.

    i try the following code. but it is not working. please see the attachment for details. please provide me detail example or code , how to solve this ?

    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;
    using Telerik.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI;
     
    /// <summary>
    /// Summary description for UrlWebEditorCustom
    /// </summary>
    namespace Telerik.FileManager.Custom
    {
        public class UrlWebEditorCustom : Telerik.FileManager.UrlWebEditor
        {
            DirectoryInfo a = new DirectoryInfo(HttpContext.Current.Server.MapPath("~/SlideData/"));
     
            public UrlWebEditorCustom()
            {
                //
                // TODO: Add constructor logic here
                //
            }
     
            protected override void CreateChildControls()
            {
     
                this.Controls.Clear();
                this.manageFiles = new ManageFiles(HttpContext.Current.Server.MapPath("~/SlideData/"));
                this.manageFiles.SetFilesGridColumnVisibility(false, false, false);
                // here get the RadGrid from files grid collection and set its page size
                FilesGrid fg = manageFiles.Controls[1] as FilesGrid;
                // 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 = 200;
                this.manageFiles.SelectedFolder = a;
                this.Controls.Add(this.manageFiles);
     
            }
     
     
            protected override void OnPreRender(EventArgs e)
            {
                base.OnPreRender(e);
                if (a.Parent.Name == this.manageFiles.SelectedFolder.Name)
                {
                    this.manageFiles.Controls.Clear();
                    this.manageFiles.SelectedFolder = a;
                    this.Controls.Clear();
                    this.Controls.Add(this.manageFiles);
                }
     
            }
     
     
     
     
     
            private ManageFiles manageFiles;
     
     
     
        }
    }


1 posts, 0 answered