Telerik Forums
UI for ASP.NET MVC Forum
0 answers
16 views

Any sample templates available for Kendo MVC UI File Manager that replicate Windows file explorer including appropriate icons for folders and files?

I  can see how to create and reference the templates, but could use the time savings if someone has already done this. 

The only sample in the demos is for the preview panel. How about the tree view, list view and grid view within the file manager? 

Allen
Top achievements
Rank 1
 asked on 23 Feb 2024
4 answers
425 views

I'm implementing a file manager in an MVC site that works with files located somewhere other than the site. I have got this working fine as long as I stay in the root directory. Trying to change into another directory throws the following error in the console:

 

Error! Could not navigate to the folder at the requested path(/Message Attachments). Make sure that the parent folder of the target folder has already been loaded.

As changing directories doesn't seem to be triggering anything on the server, I'm at a loss as to how to troubleshoot this.

The code in the view is pretty much right out of the demo at this point:

@(Html.Kendo().FileManager().Name("filemanager")
    .DataSource(ds =>
        {
            ds.Read(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Read", "Documents")
        );
        ds.Destroy(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Destroy", "Documents")
        );
        ds.Create(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Create", "Documents")
        );
        ds.Update(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Update", "Documents")
        );
    })
    .UploadUrl("Upload", "Documents")
    .Toolbar(tb => tb.Items(items =>
    {
        items.Add("createFolder");
        items.Add("upload");
        items.Add("sortDirection");
        items.Add("sortField");
        items.Add("changeView");
        items.Add("spacer");
        items.Add("details");
        items.Add("search");
    }))
    .ContextMenu(context => context.Items(items =>
    {
        items.Add("rename");
        items.Add("delete");
    }))
)
Anna
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 12 May 2022
1 answer
1.6K+ views

Hi,

Im using kendo MVC version 2016.3.1118.545

I want to use equal to filter on date and time column for format {MM/dd/yyyy hh:mm tt} but its not working

I have seen few solution but its only for filtering date alone.

Please provide some solution for this

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 24 Aug 2021
0 answers
69 views

I am using Telerik UI for ASP.NET MVC R2 2021 SP1 (2021.2.616)  in VB.net, Visual Studio 2019

I have added a FileManager to an MVC view following the code in the Basic Usage demo (https://demos.telerik.com/aspnet-mvc/filemanager) and everything is working correctly, except when I try to implement the code for the New Folder button (Which fires the Create command on the DataSource).


@Html.Kendo().FileManager().Name(Model.ControllerName & "_FileManager").DataSource(Sub(ds)
	ds.Read(Sub(r)
		r.Type(HttpVerbs.Post).Action("Read", Model.ControllerName)
	End Sub)
	ds.Create(Sub(c)
		c.Type(HttpVerbs.Post).Action("Create", Model.ControllerName)
	End Sub)
	ds.Update(Sub(u)
		u.Type(HttpVerbs.Post).Action("Update", Model.ControllerName)
	End Sub)
End Sub).Upload(Sub(u)
	u.Validation(Sub(v)
		v.AllowedExtensions(Model.AllowedFileExtensions)
	End Sub)
End Sub).UploadUrl("Upload", Model.ControllerName).Toolbar(Sub(t)
		t.Items(Sub(i)
		i.Add("createFolder")
		i.Add("upload")
		i.Add("sortDirection")
		i.Add("sortField")
		i.Add("spacer")
		i.Add("search")
	End Sub)
End Sub).InitialView("grid").ContextMenu(Sub(c)   
	c.Items(Sub(i)
		i.Add("download").Command(Model.ControllerName & "DownloadCommand").Text("Download").SpriteCssClass("k-icon k-i-download")
	End Sub)
End Sub)


On the demo page, if you have the developer tab open to the Network, when clicking the New Folder button you can see the request that is sent to the url defined in the Create endpoint and it contains the target path as well as the data for a FileManagerEntry object for the New Folder in the Form Data:

When I click the button in my FileManager view I can see the Form Data only includes the target property but none of the others:

Here is the code for the Create function in my Controller (it's almost identical to the demo code):


        Public Function Create(ByVal target As String, ByVal entry As FileManagerEntry) As ActionResult
            Dim newEntry As FileManagerEntry

            If String.IsNullOrEmpty(entry.Path) Then
                newEntry = CreateNewFolder(target, entry)
            End If

            Return Json(VirtualizePath(newEntry))
        End Function

I have not been able to figure out why the FileManager in my view is not returning the same data to the controller that the demo one does.

Any help would be greatly appreciated.

Cary
Top achievements
Rank 1
 asked on 13 Aug 2021
2 answers
676 views

I have implemented the File Manager like in the Demo and I have added the Download in the ContextMenu.

https://demos.telerik.com/aspnet-mvc/filemanager

https://docs.telerik.com/aspnet-mvc/knowledge-base/filemanager-create-download-command

so fare so good.

 

Now when I double click on a folder I get into the folder, but when I double click on a file nothing happens.

How can I implement that the file is open (downloaded) on double click?

 

In the Demo (https://demos.telerik.com/aspnet-mvc/filemanager) ist looks like the same behavior.

Raimo
Top achievements
Rank 1
Iron
 answered on 14 Jul 2021
1 answer
254 views

Hello

How can I make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager?

This is my problem:

When I browse to an empty folder, the folder gets reloaded every time I go into the folder.

When I browse to a folder that has files, the folder gets reloaded the first time and afterwards it won't reload/refresh anymore.

Practical case:

- Root
     - FolderA
          - File1
          - File2
     - FolderB

- If I go to FolderA, it will load both files
- When I drag File1 into FolderB, if I go to FolderB I will see the File1 inside
- I go back to FolderA and I drag File2 into FolderB
- If I go to FolderB I can only see File1 inside, FolderB was not reloaded when I went there again

The only 2 ways I found so far to see File2 inside of FolderB are:
- refreshing the whole page
- moving File1 again to another folder, when I do that File2 becomes visible again (a refresh is made);

The second way only happeens because I do a $("#FileManager").data("kendoFileManager").refresh(); but this only refreshes the folder I am currently at.

I would like to make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager.

Ianko
Telerik team
 answered on 27 Apr 2021
1 answer
37 views

     Is there a way to detect when multiple files were uploaded(via upload dialog or drag/drop) vs when a single file is uploaded?  We are trying to run different logic on the files depending on if it was multiple files or a single file that was uploaded.

 

Thanks,

-Carlos

Martin
Telerik team
 answered on 21 Apr 2021
1 answer
177 views

    When one file is dragged and dropped onto the control the Upload endpoint is called twice.

My control is declared as follows:

@(Html.Kendo().FileManager().Name("documentExplorer")
    .DataSource(ds =>
    {
        ds.Read(operation => operation
        .Type(HttpVerbs.Post)
        .Action("Read", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Destroy(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Delete", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Create(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Create", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Update(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Update", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
    })
    .InitialView("grid")
    .UploadUrl("Upload", "DocumentExplorer", new { groupId = ViewBag.GroupId })
    .Draggable(true)
    .Toolbar(tb => tb.Items(items =>
    {
        items.Add().Type("button").Text("").Command("NavigateToRoot").HtmlAttributes(new { title = "Go to Root" }).Icon("home");
        
    }))
    .Events(e => {
        e.Open("downloadFile");
        e.Execute("onExecute");
        e.Navigate("onNavigate");
        e.DataBinding("onDataBinding");
        e.DataBound("onDataBound");

        e.Drop("onDrop");

    })
)

 

I'm using the events mostly for troubleshooting this issue, so they just output the received event/data.  That being said, the onDrop is not being called.  Any help with figuring out why this happens will be greatly appreciated.

 

Thanks,

-Carlos

Aleksandar
Telerik team
 answered on 20 Apr 2021
1 answer
48 views

Hi,

i was working on MVC project and rendered the filemanager in view with helpers.

after first loading the filemanager i did select a file and using "getSelected()" method, it returns an array of "FileManagerEntry" for each selected file.

when you load the second time it shows no files selected and in this case when i call the same "getSelected()" method, still it returns  1 record. i was expecting to be 0.  can you please let me know what would be the issue.

 

Thanks

Regards

Hassan.

Aleksandar
Telerik team
 answered on 14 Apr 2021
2 answers
62 views

I have an MVC application running on the C: drive of my web server.  I need to access files on the same machine, but a different drive, located at D:\Files.

I can't find an example of how this is accomplished.  The FileManager demo uses the application content folder for file storage, so that is not much help in this instance.  I've searched this forum, google and SO but I can't find a working example of how this is accomplished.  Most of the answers I've found simply point back to the FileManger demo without any explanation.

I would certainly appreciate any insight you can provide for this topic.

Thanks!

Jason
Top achievements
Rank 1
 answered on 23 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?