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

Limit number of files that can be uploaded

4 Answers 79 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 09 Jan 2013, 01:29 PM
Hi

The Upload function of RadEditor Image Manager is a great convenience feature for developers, but I would like to simplify the upload dialog a little for my inexperienced users by showing a single select box in the first instance, instead of the three that show by default. How can I best do this?

There doesn't seem to be a property of the image manager for this.

Thanks

Clive

Q2 2010 version of the controls on asp.net 4.0

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Jan 2013, 01:53 PM
Hello,

You can see how to implement this feature in this KB article: Displaying single upload control in the FileBrowser Upload manager.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Clive Hoggar
Top achievements
Rank 1
answered on 26 Feb 2013, 10:05 AM
Hi

Thanks for this, which works as expected.  

It would be nice to remove the 'Remove' link and the 'Add' button, so keep the UI as simple as possible.
Is it possible to do this also?

Thanks

Clive
0
Rumen
Telerik team
answered on 27 Feb 2013, 03:17 PM
Hi Clive,

Yes, after getting a reference to the Upload control () you can set the rfe.Upload.ControlObjectsVisibility enum property and display only the desired buttons of RadUpload. You can find more information in this help article: Configure the UI of RadUpload.

Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Clive Hoggar
Top achievements
Rank 1
answered on 27 Feb 2013, 04:44 PM
Hi Rumen

Thanks - That's perfect! So for reference of anyone else, I added a line into the ascx user control shown in the article Displaying single upload control in the FileBrowser Upload manager that you referenced, as below.

Thanks a lot

Clive


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class EditorControl : System.Web.UI.UserControl
{
    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;
// ADDED THIS LINE BELOW to show only the clear button
            rfe.Upload.ControlObjectsVisibility = ControlObjectsVisibility.ClearButtons; 
        }
    }
 
 
 
    private Control FindRadControl(Control parent)
    {
        foreach (Control c in parent.Controls)
        {
 
            if (c is Telerik.Web.UI.RadFileExplorer) return c;
            if (c.Controls.Count > 0)
            {
                Control sub = FindRadControl(c);
                if (sub != null) return sub;
            }
        }
        return null;
    
}
Tags
Editor
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Clive Hoggar
Top achievements
Rank 1
Share this question
or