FileExplorer - File Selector Dialog

Isolate this demo as a stand-alone application

The example above shows how to create a simple File Selector Dialog. On Open button click a RadWindow containing a RadFileExplorer control is displayed. Once the user browses to a file and double clicks on it, the OnClientFileOpen event is fired and the selected file path is populated in the RadTextBox declared on the parent page.

<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-narrow">
        <label for="fileName">Select a file:</label>
        <telerik:RadTextBox ID="fileName" runat="server" Width="345px" Skin="Silk">
            <ClientEvents OnLoad="textBoxLoad" />
        </telerik:RadTextBox>
        <telerik:RadButton ID="selectFile" OnClientClicked="OpenFileExplorerDialog" AutoPostBack="false"
            Text="Open..." runat="server" Skin="Silk"></telerik:RadButton>    
    </div>
    <telerik:RadWindowManager ID="theWindowManager" runat="server" Skin="Silk">
        <Windows>
            <telerik:RadWindow runat="server" Width="550px" Height="560px" VisibleStatusbar="false"
                ShowContentDuringLoad="false" NavigateUrl="Explorer.aspx" ID="ExplorerWindow"
                Modal="true" Behaviors="Close,Move">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?