Get selected value

1 Answer 73 Views
FileExplorer
Kurt Kluth
Top achievements
Rank 1
Kurt Kluth asked on 17 Sep 2021, 12:40 PM | edited on 17 Sep 2021, 03:00 PM

Have a Fileexplorer getting the results from an FTP connection.  What I would like to do is set the selected/highlighted item from the value that will be returned in a SQL Dataset.  

For example if FileExplorer currently has FileA, FileB, FileC, FileD listed and the database says for this record use FileB, well FileB is selected.

Also how do I add the value someone upload's so it can go into the database?


            <telerik:RadFileExplorer RenderMode="Lightweight" runat="server" ID="FileExplorer1" Width="520px" Height="200px" EnableCopy="true" ExplorerMode="FileTree">
                
            </telerik:RadFileExplorer>

 


            Dim paths As String() = New String() {"/"}
            FileExplorer1.Configuration.ViewPaths = paths

            Dim deletePaths As String() = New String() {"/", "/"}
            FileExplorer1.Configuration.DeletePaths = deletePaths

            Dim uploadPaths As String() = New String() {"/", "/"}
            FileExplorer1.Configuration.UploadPaths = uploadPaths

            'The "ROOT/CanDelAndUpload/" folder Is configured with full permissions
            FileExplorer1.Configuration.ContentProviderTypeName = GetType(FtpContentProvider).AssemblyQualifiedName

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 20 Sep 2021, 05:20 PM

Hello Kurt,

You can set the initially selected file in RadFileExplorer by passing the path to in to the control's InitialPath property:

https://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/initialpathandpaging/defaultcs.aspx

You will just need to make sure that the passed path is the same like shown in the AddressBar of the control:

 

As per your second question, can you elaborate a bit on what exactly do you want to achieve? If you want to get the Uploaded file data you can handle the ItemCommand event of the control, which is thrown just before the uploaded file is saved:

https://docs.telerik.com/devtools/aspnet-ajax/controls/fileexplorer/server-side-programming/events#itemcommand 

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
FileExplorer
Asked by
Kurt Kluth
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or