I tried using the following demo tutorials But path of my folder didn't get and not working
Link demo: https://docs.telerik.com/kendo-ui/api/javascript/ui/filemanager/methods/path
This is My Code FileManager:
Image 1 : When click each Folder, Console show yellow message
Image 2 : My Json data Url Read call
$("#fileManager").kendoFileManager({
dataSource: {
schema: {
data: 'data'
},
transport: {
read: function(options) {
var that = this;
$.ajax({
url: " //My Url call API ",
dataType: "json",
method: "POST",
data: that.parameterMap ? that.parameterMap(options.data, "read") : options.data,
success: function(result) {
options.success(result);
}
});
},
destroy: function(options) {
console.log(" Test call Function "); // Call Function not working, cannot call
}
}
},
toolbar: {
items: [
{ name: "custom" ..... }, // insert and upload, I use custom command
{ name: "custum" ..... },
{ name: "sortDirection" },
{ name: "sortField" },
{ name: "changeView" },
{ name: "spacer" },
{ name: "details" },
{ name: "search" }
]
},
contextMenu: {
items: [
{ name: "rename" },
{ name: "delete" }
]
},
draggable: true,
resizable: true
});
var fileManager = $("#fileManager").data("kendoFileManager");
fileManager.navigate("Animal"); // not target red zone folder
var path = fileManager.path(); //not show log
This is demo code about filemanage: https://demos.telerik.com/kendo-ui/filemanager/index
<script>
$("#filemanager").kendoFileManager({
dataSource: {
schema: kendo.data.schemas.filemanager,
transport: {
read: {
url: "/kendo-ui/service/FileManager/Read",
method: "POST"
},
create: {
url: "/kendo-ui/service/FileManager/Create",
method: "POST"
},
update: {
url: "/kendo-ui/service/FileManager/Update",
method: "POST"
},
destroy: {
url: "/kendo-ui/service/FileManager/Destroy",
method: "POST"
}
}
},
uploadUrl: "/kendo-ui/service/FileManager/Upload",
toolbar: {
items: [
{ name: "createFolder" },
{ name: "upload" },
{ name: "sortDirection" },
{ name: "sortField" },
{ name: "changeView" },
{ name: "spacer" },
{ name: "details" },
{ name: "search" }
]
},
contextMenu: {
items: [
{ name: "rename" },
{ name: "delete" }
]
},
draggable: true,
resizable: true
});
$(document).ready(function () {
var filemanager = $("#filemanager").getKendoFileManager();
filemanager.executeCommand({ command: "TogglePaneCommand", options: { type: "preview" } });
filemanager.toolbar.fileManagerDetailsToggle.switchInstance.toggle();
})
</script>
I still don't understand, right at the items position there is nothing related to "tranport: read" but still can read the data of the items. So where is that data retrieved through?
This is link read data but it only of Folder: https://demos.telerik.com/kendo-ui/service/FileManager/Read
Can Admins explain in depth for me??
I am working on a project using filemanager and I am currently spending a lot of time. Hope Admins can help me.
THis is my Project code:
$("#filemanager").kendoFileManager({
dataSource: {
transport: {
read: function (options) {
var that = this;
$.ajax({
url: "/_layouts/15/xxx/API/ApiHandler.ashx?tbl=like&func=getalllibrary",
cache: false,
scriptCharset: "utf8",
dataType: "json",
method: "POST",
data: that.parameterMap ? that.parameterMap(options.data, "read") : options.data,
success: function (result) {
options.success(result);
}
});
},
destroy: function (options) {
console.log("Here Hello"); //[error] not show log when click delete => cannot call function destroy
}
},
schema: {
data: 'data',
}
},
toolbar: {
items: [
{ name: "custom", type: "button", text: "Create", command: "MyCustomCommandCreate" },
{ name: "custom", type: "button", text: "Upload", command: "MyCustomCommandUpload" },
{ name: "sortDirection" },
{ name: "sortField" },
{ name: "changeView" },
{ name: "spacer" },
{ name: "details" },
{ name: "search" }
]
},
contextMenu: {
items: [
{ name: "rename" },
{ name: "delete" },
{ name: "custom", text: "Detect", command: "MyCustomCommandDetect", spriteCssClass: "k-icon k-i-info" }
]
},
draggable: true,
resizable: true
});
var filemanager = $("#filemanager").getKendoFileManager();
filemanager.executeCommand({ command: "TogglePaneCommand", options: { type: "preview" } });
filemanager.toolbar.fileManagerDetailsToggle.switchInstance.toggle();
var filemanagerNS = kendo.ui.filemanager;
filemanagerNS.commands.MyCustomCommandUpload = filemanagerNS.FileManagerCommand.extend({
exec: function () {
myWindow.data("kendoWindow").open();
}
});
filemanagerNS.commands.MyCustomCommandCreate = filemanagerNS.FileManagerCommand.extend({
exec: function () {
myWindowAddLibrary.data("kendoWindow").open();
}
});
Click Folder not red hover and Console show Error: ( image1.png )
My json data in Url transport: read: ( image2.png )
Hope the admin can show me how to show the item corresponding to my folder
I am working With Kendo FileManager, I need get value name of Folder and get value of Items in Folder to API work.
Please guide for me.
Thanks Admins and Everyone so much.
Hi
I am not able to find a sample of how to configure the click event in
the datagrid part of the FileManager.
Can you plaese guide me how to add a function to an item?
$("#filemanager").kendoFileManager({ contextMenu: { items: [ { name: 'Delete', text: 'Delete', // click event } ] },
I make custom command for file upload and open model. click cancel and open again its give me error in console.
Hi,
We have created file manger in that we have content menu but context menu is not opening in IPad iOS in desktop view.
You have provided solution for ASP.NET AJAX below is the link for that.
https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/contextmenu-not-working-ipad-ios13-safari#suggested-workarounds
Can you please provide the same solution for Kendo UI Jquery?
Thanks,
Vishal
I noticed that if I take control of the grid view through the views.grid object of the FileManager and I enable filtering in the grid, there appear to be some issues
1. All filtering options seem to default to the text/string format instead of the format that should be defined in the model. The date created column for example, does not show a date picker.
2. The operators are missing.
Here is a link to an example I set up in the dojo: https://dojo.telerik.com/ACiDOsAs
Is this a bug or as intended, and am I missing anything to get filtering working?
Thanks.
When View Details is enabled and details are shown for docx files, the TYpe is showing as 'Text'.
This happens in the online demo:https://demos.telerik.com/kendo-ui/filemanager/index
Go to the documents folder and select WordDocument with View Details enabled to see example
Is this a bug or as intended?
I am having an issue with the display of folders in the FileManager on initial load. If I use a local data source, everything works fine.(see Capture_local.png)
Here is an example of my local datasource:
var data = [
{
"name": "Training1",
"size": 0,
"path": "Training1",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training2",
"size": 0,
"path": "Training2",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training3",
"size": 0,
"path": "Training3",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
}
];
If I set the FileManager to use a remote datasource, I am getting NaN showing in the name column. (see Capture_remote.png)
The remote datasource returns the same as above.
Here is my FileManager config:
var filemanager = $("#fileManager").kendoFileManager({
dataSource: filemanagerDataSource,
height:600,
initialView: 'grid',
contextMenu: false,
toolbar: {
items: [
{ name: "sortDirection" }filemanagerDataSource,
{ name: "changeView" },
{ name: "spacer" },
{ name: "details" },
{ name: "search" }
]
},
views: {
grid: {
noRecords: true,
}
}
}).data('kendoFileManager');
I can set the FileManager demo (using kendo dojo) to use the grid view on initial load and it seems to work fine, so I'm not sure what may be causing the issue. Any help would be appreciated. Please let me know if more info is needed.
Thank you.