I'm trying to use the delete context method, but when selecting multiple folders and deleting them it sends the same delete request multiple times. The more folders (no subfolders) I try to delete the more requests it sends.
My theory is that the datasource somehow doesn't register it has been deleted, so it tries to automatically sync the datasource by sending it again. Note that I'm using a virutal filesystem, but I'm returning the same object as in this sample
Also note that I'm using a mix of MVC and Jquery so I have a custom scheme as recommended in some of my previous tickets.
This is scheme:
$.extend(true, kendo.data, {
schemas: {
"filemanager": {
data: function (data) {
return data.Items || data || [];
},
model: {
id: "path",
hasChildren: "hasDirectories",
fields: {
entryId: { field: "EntryId", editable: false, type: "Number" },
folderId: { field: "FolderId", editable: false, type: "Number" },
name: { field: "Name", editable: true, type: "String", defaultValue: "New Folder" },
size: { field: "Size", editable: false, type: "Number" },
path: { field: "Path", editable: false, type: "String" },
extension: { field: "Extension", editable: false, type: "String" },
isDirectory: { field: "IsDirectory", editable: false, defaultValue: true, type: "Boolean" },
hasDirectories: { field: "HasDirectories", editable: false, defaultValue: false, type: "Boolean" },
created: { field: "Created", type: "Date", editable: false },
createdUtc: { field: "CreatedUtc", type: "Date", editable: false },
modified: { field: "Modified", type: "Date", editable: false },
modifiedUtc: { field: "ModifiedUtc", type: "Date", editable: false }
}
}
}
}
});
$("#document-manager").kendoFileManager({
dataSource: {
transport: {
read: {
type: "post",
url: "/FileManager/Read",
data: function() {
return getFileMetaData()
}
},
update: {
type: "post",
url: "/FileManager/Rename",
},
create: {
type: "post",
url: "/FileManager/Create",
data: function () {
return getFileMetaData()
}
},
destroy: {
type: "post",
url: "/FileManager/DeleteEntry"
}
},
},
contextMenu: {
items: [
{ name: "rename" },
{ name: "delete" }
]
},
});
And lastly my C# controller method which deletes the folder and returns the same object as in the above mentioned sample:
[HttpPost]
public async Task<ActionResult> DeleteEntry(FileManagerEntry deleteDto)
{
await _fileManagerService.DeleteEntry(deleteDto);
return Json(new object[0], JsonRequestBehavior.AllowGet);
}
You can also see in this screencast that it sends the delete request multiple times for the same entry:
https://screencast-o-matic.com/watch/cYfolKzXZs
The FileManager shows only the Documents folder
The FileManager shows all folders on root level (Documents and Images)
In the FileManager, adding a new subfolder and then selecting the parent folder ( or switching between Grid and List View ) results in duplicated subfolder.
Regression introduced with 2024.2.519
The new subfolder is duplicated.
The subfolder should not be duplicated.
According to https://docs.telerik.com/kendo-ui/controls/data-management/filemanager/context-menu:
You can define your custom items which can execute custom commands
However, no option allows me to configure my own commands.
I managed to hack this: https://dojo.telerik.com/@GaloisGirl/iLoHIhoh , but it's an ugly solution.
Dear,
We are trying to make the FileManager compatible with mobile.
Could there be extra configuration so it hides certain properties of widgets?
An example if mobile:
- Hide the text in the Toolbar
- Hide the TreeView
- Optional hide the search bar and details options
Or are there other possibilities on the roadmap?
Kind regards,
ITwIT
In the Grid view of the FileManager, if you choose to Sort By Date from the Toolbar, the sort icon in the Grid's column header is missing.
The sort arrow icons are missing in the Grid's column header
The icons should be visible
I'd like to request the ability to hide and display certain files. For example, hide all pdfs, but show docx files.
Thanks!
With LESS bootstrap theme, the scrollbar does not appear in the ListView if there are too many files.
The scrollbar does not appear when there are too many items in the ListView.
A scrollbar should appear
When using the trackpad for a laptop, the tap event does not fire when selecting files in the Kendo UI FileManager.
The tap event will not fire the Select event.
The tap event should fire the Select event.
This event does fire for a physical mouse click, and with the touch event on a mobile device.
Context: my communication with the back-end is wrapped in a library, that handles the xhr requests and if needed, throws a custom exception. My transport is therefore made of functions. The sample below simulates getting an error from that library.
Demo: https://dojo.telerik.com/@GaloisGirl/ayEpOKOQ/2
Actual result:
This one is a bit complex:
Any "delete" operation can be replaced by a "rename" operation, and the result is the same.
The problem does not happen at root level. I don't know if it's because it's the root levels, or because the elements are directories.
Dear,
In the filemanager we can use the icon property in the toolbar.
String
Sets icon for the item. The icon should be one of the existing in the Kendo UI theme sprite.
Is it possible to implement this also for the context menu now it uses next property.
String
Specifies the spriteCssClass of the item.
It's easier to make use of the icon class then the spriteCssClass.
Is this a possible feature?
Kind regards,
ITwIT
If you try to specify an icon through the ContextMenu items in the FileManager, no icon is rendered.
Regression introduced with 2023.1.117
Workaround: https://dojo.telerik.com/oFuGacAT/14
No icons are shown in the ContextMenu
The specified icons should be visible
For the future it would be nice if a separate "move" endpoint was optionally available since many of us tend to use virtual filesystem layouts instead of real filsystems.
That said, I used the advice here to setup my own custom handling for file moves:
FileManager - Detect move vs copy in UI for ASP.NET MVC | Telerik Forums
If I preventDefault, I can only do 1-2 moves before I am then unable to navigate the folders anymore through either column. If I allow it to propogate and fire off the create and destroy request (my serverside functions ignore these as invalid), the navigation continues to work.
Can you suggest what events I can maybe fire manually to trigger success without making the create and destroy request, or suggest another way to fix this issue?
My move handler:
function onexecute(e) {
if (e.command == "MoveCommand") {
var d = {
'items' : e.options.items,
'targetfolder' : e.options.target
};
$.post('/Data/Gallery_move?aid=@Model.Asset.ID', d)/*, function(data){
});*/
//e.preventDefault();
}
}
There is no padding between semicolon and the data "Type:Folder" wouldn't be better "Type: folder" with a space in between?
When the FileManager is initialized with a local data source the Context Menu is not displayed.
The context menu is not displayed. The Context menu is not expected to be displayed for the built-in rename and delete commands, but a context menu is not displayed when custom commands are implemented.
A context menu should be displayed when local data source is used.