This is a migrated thread and some comments may be shown as answers.

[Solved] Paging In Manager Dialogs

3 Answers 107 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 30 Oct 2009, 10:40 AM
Hi

I am trying to change the paging configuration size for the number of items displayed in the Image/Flash/Media/Document manager dialogs but cannot see where I would set this value.

I have followed the instructions in the "Customising Built In Dialogs" page and have been looking at the source of the "/EditorDialogs/FileBrowse.acsx" control :

            <telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px" 
                runat="Server" EnableOpenFile="false" AllowPaging="true"
 


...but cannot see how I would change the paging configuration to limit results to say 10 per page.

Thanks

Steve

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Nov 2009, 12:47 PM
Hi Steve,

Using the FindRadControl function provided in the following KB article: Displaying single upload control in the FileBrowser Upload manager, you will be able to get a reference to the RadGrid control in the FileExplorer control and change its paging configuration.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steve
Top achievements
Rank 1
answered on 04 Nov 2009, 04:18 PM
Hi Rumen

Thanks this works a treat :

protected void Page_Load(object sender, System.EventArgs args)   
    {   
        Telerik.Web.UI.RadFileExplorer rfe = (Telerik.Web.UI.RadFileExplorer)this.FindRadControl(this.Page);   
        if (rfe != null)   
        {  
            rfe.Upload.MaxFileInputsCount = 1
            rfe.Grid.PageSize = 15
        }   
    } 

Strange thing is that when using the debugger/quick watch in Visual studio the .PageSize property was set to 10 by default.  However my image folder contained 22 images and all were displayed on a single page.

Changing the number to anything other than 10 will make the paging work (which is what I will be doing) but for some reason explicitly setting the paging to 10 (or leaving the default) means that the paging does not seem to work - not a big issue for me but may be a bug in there somewhere ?

Thanks

Steve
0
Lini
Telerik team
answered on 05 Nov 2009, 08:41 AM
Hello Steve,

I think this behavior is by design - page size 10 is the default for the grid component. If you enable paging in the file explorer and don't set the page size, the control will display up to 100 items on one page even though the grid is set to 10. This is done to optimize the server loading time of the control. The grid needs to initialize the rows on the server and the larger the page size, the longer it takes to do it.

Sincerely yours,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Steve
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Steve
Top achievements
Rank 1
Lini
Telerik team
Share this question
or