New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Telerik File Explorer control

You can find information on the server-side API of RadFileExplorer at .

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(RadFileExplorerScripts))]
[ClientScriptResource("Telerik.Web.UI.RadFileExplorer", "Telerik.Web.UI.FileExplorer.RadFileExplorer.js")]
[TelerikToolboxCategory("Miscellaneous")]
[ToolboxBitmap(typeof(RadFileExplorer), "Toolbox.Icons.FileExplorer.png")]
[EmbeddedSkin("FileExplorer")]
[EmbeddedSkin("FileExplorer", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadFileExplorer))]
public class RadFileExplorer : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ICallbackEventHandler, INamingContainer, ISkinnableControl, IControl

Inheritance: objectControlWebControlRadWebControlRadFileExplorer

Implements: IAttributeAccessorICallbackEventHandlerIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorINamingContainerIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadFileExplorer()

Properties

Specifies an access key to enable keyboard navigation for the File Explorer control

C#
public override string AccessKey { get; set; }

Overrides: RadWebControl.AccessKey

When set to true, this property will enable paging in the File Explorer's Grid component.

C#
[ClientControlProperty]
public bool AllowPaging { get; set; }

Gets a reference to the async upload component, which shows inside a popup window when the user wants to upload files. If you want to set the allowed file types or max upload file size, please use the Configuration property

C#
[Browsable(false)]
public virtual RadAsyncUpload AsyncUpload { get; }

Determines which file list controls will be available on the client-side so that their respective file list view can be displayed dynamically

C#
public FileListControls AvailableFileListControls { get; set; }
C#
protected string CommandArgument { get; set; }

Contains the FileExplorer configuration (paths, content provider type, etc.).

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileExplorerConfiguration Configuration { get; }
Property Value:

An FileManagerDialogConfiguration instance, containing the configuration of the control

C#
protected virtual FileBrowserContentProvider ContentProvider { get; set; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadWebControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Returns the currently selected node in the tree. This property is useful during postbacks.

C#
[Browsable(false)]
public string CurrentFolder { get; }

Gets or sets a value indicating whether to show the up one folder (..) item in the grid if available.

C#
public bool DisplayUpFolderItem { get; set; }

Gets or sets a value indicating whether to allow opening a new window with the file

C#
[Obsolete("Please use the Configuration-EnableAsyncUpload property instead")]
public bool EnableAsyncUpload { get; set; }

Gets or sets a value indicating whether to allow copying of files/folders

C#
public bool EnableCopy { get; set; }

Gets or sets a value indicating whether to allow creating new folders

C#
public bool EnableCreateNewFolder { get; set; }

When set to true, performs the filtering after the "Enter" key is pressed. EnableFilterTextBox should be set to true (i.e. filtering enabled) to enable filtering.

C#
[ClientControlProperty]
[ClientPropertyName("enableFilteringOnEnter")]
public bool EnableFilteringOnEnterPressed { get; set; }

When set to true, renders a textbox used to filter files in the grid.

C#
public bool EnableFilterTextBox { get; set; }

Gets or sets a value indicating whether to allow opening a new window with the file

C#
[ClientControlProperty]
public bool EnableOpenFile { get; set; }

Gets or sets the current FileExplorerMode (e.g. default, show files in the tree, etc.)

C#
public FileExplorerMode ExplorerMode { get; set; }

Gets a reference to the grid, which shows on the right of the file explorer control.

C#
[Browsable(false)]
public FileList FileList { get; }

Gets or sets the text of the label displayed next to the Filter TextBox.

C#
public string FilterTextBoxLabel { get; set; }

Gets a reference to the grid, which shows on the right of the file explorer control.

C#
[Browsable(false)]
public RadGrid Grid { get; }

Gets a reference to the context menu, which shows when the user right-clicks the grid control

C#
[Browsable(false)]
public RadContextMenu GridContextMenu { get; }

Gets or sets the height of the Web server control.

C#
public override Unit Height { get; set; }
Property Value:

A System.Web.UI.WebControls.Unit that represents the height of the control. The default is System.Web.UI.WebControls.Unit.Empty.

Exceptions: ArgumentException

The height of the Web server control was set to a negative value.

Overrides: RadWebControl.Height

Gets or sets the initial path that will be shown in the file explorer control.

C#
public string InitialPath { get; set; }

If this property is not set, the file explorer will use the first path in the ViewPaths as the initial one.

Gets the Keyboard Shortcuts of the FileExplorer control.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileExplorerShortcut KeyboardShortcuts { get; }

Gets or sets a string containing the localization language for the File Explorer UI

C#
public string Language { get; set; }

Gets a reference to the grid, which shows on the right of the file explorer control.

C#
[Browsable(false)]
public RadListView ListView { get; }
C#
[Browsable(false)]
public DialogLocalizationStrings Localization { get; }
C#
protected List<string> LocalizationKeys { get; }

Gets or sets a value indicating where the control will look for its .resx localization files. By default these files should be in the App_GlobalResources folder. However, if you cannot put the resource files in the default location or .resx files compilation is disabled for some reason (e.g. in a DotNetNuke environment), this property should be set to the location of the resource files.

C#
public string LocalizationPath { get; set; }
Property Value:

A relative path to the dialogs location. For example: "~/controls/RadEditorResources/".

If specified, the LocalizationPath property will allow you to load the control localization files from any location in the web application.

The name of the javascript function called when the user tries to copy a file or folder.

C#
[ClientControlEvent]
[ClientPropertyName("copy")]
public string OnClientCopy { get; set; }

The name of the javascript function called when the user tries to create a new folder.

C#
[ClientControlEvent]
[ClientPropertyName("createNewFolder")]
public string OnClientCreateNewFolder { get; set; }

The name of the javascript function called when the user tries to delete a file.

C#
[ClientControlEvent]
[ClientPropertyName("delete")]
public string OnClientDelete { get; set; }

The name of the javascript function called when an item is double clicked in the grid.

C#
[ClientControlEvent]
[ClientPropertyName("fileOpen")]
public string OnClientFileOpen { get; set; }

The name of the client-side method called when the user drops files in the file list.

C#
[ClientControlEvent]
[ClientPropertyName("filesDropping")]
public string OnClientFilesDropping { get; set; }

The name of the javascript function called when the user filters the files in the grid.

C#
[ClientControlEvent]
[ClientPropertyName("filter")]
public string OnClientFilter { get; set; }

The name of the javascript function called when the the selected folder in the tree changes.

C#
[ClientControlEvent]
[ClientPropertyName("folderChange")]
public string OnClientFolderChange { get; set; }

The name of the javascript function called when a folder is loaded in the grid.

C#
[ClientControlEvent]
[ClientPropertyName("folderLoaded")]
public string OnClientFolderLoaded { get; set; }

The name of the javascript function called before the control loads in the browser.

C#
[ClientControlEvent]
[ClientPropertyName("init")]
public string OnClientInit { get; set; }

The name of the javascript function called when the user selects an item in the explorer.

C#
[ClientControlEvent]
[ClientPropertyName("itemSelected")]
public string OnClientItemSelected { get; set; }

The name of the javascript function called when the control loads in the browser.

C#
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }

The name of the javascript function called when the user tries to rename/move a file or folder.

C#
[ClientControlEvent]
[ClientPropertyName("move")]
public string OnClientMove { get; set; }

Gets or sets a value, indicating whether files that already exist in RadFileExplorer will be overwritten.

C#
[ClientControlProperty]
[ClientPropertyName("overwriteExistingFiles")]
public bool OverwriteExistingFiles { get; set; }

Gets or sets the current PageSize of the grid

C#
public int PageSize { get; set; }
C#
protected char PathSeparator { get; }

Specifies the rendering mode of the control. Setting the mode to Lightweight will yield HTML 5/CSS 3 html and css.

C#
public override RenderMode RenderMode { get; set; }

Overrides: RadWebControl.RenderMode

Implements: ISkinnableControl.RenderMode

Lightweight rendering mode might change the outlook of the component in some older browsers that don't support CSS3/HTML5.

Specifies the skin that will be used by the control

C#
[TypeConverter("Telerik.Web.Design.SkinTypeConverter, Telerik.Web.Design, Version=2026.3.812.462, Culture=neutral, PublicKeyToken=121fae78165ba3d4")]
public override string Skin { get; set; }

Overrides: RadWebControl.Skin

Implements: ISkinnableControl.Skin

Gets a reference to the splitter component in the file explorer

C#
[Browsable(false)]
public RadSplitter Splitter { get; }
C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets a reference to the toolbar, which shows on the top of the file explorer control.

C#
[Browsable(false)]
public RadToolBar ToolBar { get; }

Gets a reference to the tooltip control used for meta information popups

C#
[Browsable(false)]
public RadToolTip TooltipControl { get; }

Gets or sets the width of the file explorer's tree pane

C#
public Unit TreePaneWidth { get; set; }
Property Value:

A System.Web.UI.WebControls.Unit that represents the width of the control. The default is 222 pixels.

Exceptions: ArgumentException

The width of the Web server control was set to a negative value.

Gets a reference to the tree, which shows on the left of the file explorer control.

C#
[Browsable(false)]
public virtual RadTreeView TreeView { get; }

Gets a reference to the upload component, which shows inside a popup window when the user wants to upload files. If you want to set the allowed file types or max upload file size, please use the Configuration property

C#
[Browsable(false)]
public RadUpload Upload { get; }

Determines which of the FileExplorer controls will be visible(available).

C#
public FileExplorerControls VisibleControls { get; set; }

Gets or sets the width of the Web server control.

C#
public override Unit Width { get; set; }
Property Value:

A System.Web.UI.WebControls.Unit that represents the width of the control. The default is System.Web.UI.WebControls.Unit.Empty.

Exceptions: ArgumentException

The width of the Web server control was set to a negative value.

Overrides: RadWebControl.Width

Gets a reference to the window component, which shows the upload popup and the alert/confirmation dialogs.

C#
[Browsable(false)]
public RadWindowManager WindowManager { get; }

Methods

Rebinds the tree in the RadFileExplorer control. If there were any nodes in the tree when this method is called, they will be cleared unless you set the RadFileExplorer.Tree.AppendDataBoundItems property to true.

C#
protected void BindExplorer()

Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason

C#
protected override void ControlPreRender()

Overrides: RadWebControl.ControlPreRender()

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeComponent(IScriptDescriptor)

C#
public string GetCallbackResult()
Returns:

string

Implements: ICallbackEventHandler.GetCallbackResult()

Get the Grid data for the current selected folder in the file explorer tree

C#
protected virtual List<FileBrowserItem> GetExplorerData(string path, string sortExpression, int startIndex, int maxRowNumber, bool includeFiles, string control, out int itemsCount, string filterKeyWord)
Parameters:pathstring

path to current selected folder

sortExpressionstring

sort argument (column and direction)

startIndexint

the index of the first item to return (used for paging)

maxRowNumberint

the number of items to return (used for paging)

includeFilesbool

if set to true, will return files and folders, otherwise only folders

controlstring

the control that needs the data ("grid" or "tree")

itemsCountint

out parameter - set to the number of items returned

filterKeyWordstring

the keyword used to filter the items in the grid

Returns:

List<FileBrowserItem>

a list of files and folders in the selected path

Get the Grid data for the current selected folder in the file explorer tree

C#
protected virtual List<FileBrowserItem> GetExplorerData(string path, string sortExpression, int startIndex, int maxRowNumber, bool includeFiles, string control, out int itemsCount)
Parameters:pathstring

path to current selected folder

sortExpressionstring

sort argument (column and direction)

startIndexint

the index of the first item to return (used for paging)

maxRowNumberint

the number of items to return (used for paging)

includeFilesbool

if set to true, will return files and folders, otherwise only folders

controlstring

the control that needs the data ("grid" or "tree")

itemsCountint

out parameter - set to the number of items returned

Returns:

List<FileBrowserItem>

a list of files and folders in the selected path

C#
protected virtual void InitContentProvider()
C#
protected virtual void InitContentProvider(string selectedUrl)
Parameters:selectedUrlstring

Determines if the "MetroTouch" is used by the RadFileExplorer control.

C#
protected virtual bool IsMetroTouchSkin()
Returns:

bool

True if "MetroTouch" skin is used, false otherwise.

Restores view-state information from a previous request that was saved with the System.Web.UI.WebControls.WebControl.SaveViewState() method.

C#
protected override void LoadViewState(object state)
Parameters:stateobject

An object that represents the control state to restore.

Overrides: WebControl.LoadViewState(object)

Fired when the grid data is retrieved from the content provider.

C#
protected virtual void OnExplorerPopulated(RadFileExplorerPopulatedEventArgs e)
Parameters:eRadFileExplorerPopulatedEventArgs

an instance of the RadFileExplorerEventArgs event argument.

C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: RadWebControl.OnInit(EventArgs)

Fired when on all file explorer file and folder operations.

C#
protected virtual void OnItemCommand(RadFileExplorerEventArgs e)
Parameters:eRadFileExplorerEventArgs

an instance of the RadFileExplorerEventArgs event argument.

This method is used in the RadTreeView1_NodeExpand handler, in the TreeUpdatePanel_AjaxRequest method, when a folder is created and in the TreeUpdatePanel_AjaxRequest method, in order to reach a node in the tree

C#
protected void PopulateTreeNode(RadTreeNode currNode)
Parameters:currNodeRadTreeNode

The node to be populated

C#
protected virtual void RadTreeView1_NodeDrop(object sender, RadTreeNodeDragDropEventArgs e)
Parameters:senderobjecteRadTreeNodeDragDropEventArgs

Handle Renaming of folders

C#
protected void RadTreeView1_NodeEdit(object sender, RadTreeNodeEditEventArgs e)
Parameters:senderobject

tree instance

eRadTreeNodeEditEventArgs

rename event arguments

Implemented using ASP.NET 2.0 Callback functionality built into RadTreeView

C#
protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)
Parameters:senderobject

the tree instance

eRadTreeNodeEventArgs

event arguments

C#
public void RaiseCallbackEvent(string eventArgument)
Parameters:eventArgumentstring

Implements: ICallbackEventHandler.RaiseCallbackEvent(string)

C#
protected void RaiseFileExplorerExplorerPopulated(RadFileExplorerPopulatedEventArgs e, object eventKey)
Parameters:eRadFileExplorerPopulatedEventArgseventKeyobject
C#
protected void RaiseFileExplorerItemEvent(RadFileExplorerEventArgs e, object eventKey)
Parameters:eRadFileExplorerEventArgseventKeyobject
C#
protected override void RenderChildren(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: Control.RenderChildren(HtmlTextWriter)

Saves any state that was modified after the System.Web.UI.WebControls.Style.TrackViewState() method was invoked.

C#
protected override object SaveViewState()
Returns:

object

An object that contains the current view state of the control; otherwise, if there is no view state associated with the control, null.

Overrides: WebControl.SaveViewState()

Causes the control to track changes to its view state so they can be stored in the object's System.Web.UI.Control.ViewState property.

C#
protected override void TrackViewState()

Overrides: WebControl.TrackViewState()

Updates the strings that are localizable in the FileExplorer controls. Useful if you change the Localization collection after it has already set the values to the controls.

C#
protected void UpdateLocalization()

Events

This event is fired when the grid data is retrieved from the content provider

C#
public event RadFileExplorerGridEventHandler ExplorerPopulated

This event is fired when on all file and folder operations of the file explorer. If you wish to cancel the command simply return False from your event handler.

C#
public event RadFileExplorerEventHandler ItemCommand
In this article
DefinitionConstructorsRadFileExplorer()PropertiesAccessKeyAllowPagingAsyncUploadAvailableFileListControlsCommandArgumentConfigurationContentProviderCssClassFormatStringCurrentFolderDisplayUpFolderItemEnableAsyncUploadEnableCopyEnableCreateNewFolderEnableFilteringOnEnterPressedEnableFilterTextBoxEnableOpenFileExplorerModeFileListFilterTextBoxLabelGridGridContextMenuHeightInitialPathKeyboardShortcutsLanguageListViewLocalizationLocalizationKeysLocalizationPathOnClientCopyOnClientCreateNewFolderOnClientDeleteOnClientFileOpenOnClientFilesDroppingOnClientFilterOnClientFolderChangeOnClientFolderLoadedOnClientInitOnClientItemSelectedOnClientLoadOnClientMoveOverwriteExistingFilesPageSizePathSeparatorRenderModeSkinSplitterTagKeyToolBarTooltipControlTreePaneWidthTreeViewUploadVisibleControlsWidthWindowManagerMethodsBindExplorer()ControlPreRender()CreateChildControls()DescribeComponent(IScriptDescriptor)GetCallbackResult()GetExplorerData(string, string, int, int, bool, string, out int, string)GetExplorerData(string, string, int, int, bool, string, out int)InitContentProvider()InitContentProvider(string)IsMetroTouchSkin()LoadViewState(object)OnExplorerPopulated(RadFileExplorerPopulatedEventArgs)OnInit(EventArgs)OnItemCommand(RadFileExplorerEventArgs)PopulateTreeNode(RadTreeNode)RadTreeView1_NodeDrop(object, RadTreeNodeDragDropEventArgs)RadTreeView1_NodeEdit(object, RadTreeNodeEditEventArgs)RadTreeView1_NodeExpand(object, RadTreeNodeEventArgs)RaiseCallbackEvent(string)RaiseFileExplorerExplorerPopulated(RadFileExplorerPopulatedEventArgs, object)RaiseFileExplorerItemEvent(RadFileExplorerEventArgs, object)RenderChildren(HtmlTextWriter)SaveViewState()TrackViewState()UpdateLocalization()EventsExplorerPopulatedItemCommand
Not finding the help you need?
Contact Support