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

How to find Rad upload instance at client side from RadFileExplorer

1 Answer 60 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Tarun Juneja
Top achievements
Rank 1
Tarun Juneja asked on 21 Jul 2010, 10:04 AM
Hi Guys,

I want to find the Upload instance from the RadFileExplorer instance at client side using java script.

Can someone help me out finding this?

I know how to do this at server side but not at client side.

Please let me know if something is not clear.

Thank you

Tarun

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 22 Jul 2010, 02:32 PM
Hello Tarun,


The code below illustrates how to get RadUpload's client object (RadUpload is in RadFileExplorer).
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<head id="Head1" runat="server"
    <title></title
</head
<body
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager
    <script type="text/javascript">
        function FileInit(fileExplorer, args)
        {
            var upload = $find('<%=RadFileExplorer1.Upload.ClientID %>');
            alert("upload id is:" + upload.get_id());
            alert("upload has " + upload.getFileInputs().length + " file inputs");
        }
          
    </script>
    <div
        <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" OnClientInit="FileInit"
            <Configuration ViewPaths="~/Files" DeletePaths="~/Files" UploadPaths="~/Files"/> 
        </telerik:RadFileExplorer
    </div
    </form
</body
</html>
Hope this helps.
 
Best wishes,
Petio Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
FileExplorer
Asked by
Tarun Juneja
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or