Telerik Forums
Kendo UI for jQuery Forum
1 answer
611 views

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

Neli
Telerik team
 answered on 12 May 2021
1 answer
217 views

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

Neli
Telerik team
 answered on 11 May 2021
1 answer
55 views

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.

Stark
Top achievements
Rank 1
Iron
Iron
 answered on 08 May 2021
1 answer
80 views

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
                        }

                    ]
                },

Dimitar
Telerik team
 answered on 05 May 2021
1 answer
207 views

I make custom command for file upload and open model. click cancel and open again its give me error in console.

 

 

 

Neli
Telerik team
 answered on 08 Apr 2021
1 answer
47 views

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

Martin
Telerik team
 answered on 29 Mar 2021
1 answer
67 views
Kedno UI Filemanager custom delete command treeview folder not deleted from node and treeview datasource not refreshing.
Martin
Telerik team
 answered on 26 Feb 2021
1 answer
84 views

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.

Neli
Telerik team
 answered on 13 Jan 2021
2 answers
130 views

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?

Alan
Top achievements
Rank 1
Veteran
 answered on 06 Jan 2021
2 answers
206 views

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.

Alan
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?