Telerik Forums
Kendo UI for jQuery Forum
1 answer
123 views

I have two link demo from Kendo FileManager.

First link: https://dojo.telerik.com/oFefoyIm

Second link: https://dojo.telerik.com/OxAWOrIF

Each link uses a different method of Kendo FileManager. But, with Second link, I can call function. 

Otherwise, First link can not call.

Two image will show you my test, and And I am having a similar case in First Link in my project, it cannot call the function

 

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

Can kendo FileManager show images like Image Browser?  If It can, please guide for me.

demo image browser: https://demos.telerik.com/kendo-ui/editor/imagebrowser

Image broswer can show image, that so good

Kendo FileManager is the manager must show the user how the images are?

Or can apply show image from Image Browser to FileManager. Please guide for me. Thanks

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

Hi admin and everybody,

Image show result I need

I want get name or path of items inside folder. You can follow code:


<div id="fileManager"></div>
<script>
    var baseUrl = "https://demos.telerik.com/kendo-ui/service/filemanager/";

    $("#fileManager").kendoFileManager({
        dataSource: {
            transport: {
                read: function(options) {
                    var that = this;

                    $.ajax({
                        url: baseUrl + "Read",
                        dataType: "json", 
                        method: "POST",
                        data: that.parameterMap ? that.parameterMap(options.data, "read") : options.data,
                        success: function(result) {
                            options.success(result);
                        }
                    });
                },
                update: function(options) {
                    var that = this;

                    $.ajax({
                        url: baseUrl + "Update",
                        dataType: "json", 
                        method: "POST",
                        data: that.parameterMap ? that.parameterMap(options.data, "read") : options.data,
                        success: function(result) {
                            options.success(result);
                        }
                    });
                },
                create: function(options) {
                    var that = this;

                    $.ajax({
                        url: baseUrl + "Update",
                        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(options.data.name); // can get name items
                }
            }
        },
      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" },
            { name: "custom", text: "Get Info", command: "MyCustomCommand", spriteCssClass:"k-icon k-i-info" }
          ]
        },
        draggable: true,
        resizable: true
    });
  
  var filemanagerNS = kendo.ui.filemanager;

        filemanagerNS.commands.MyCustomCommand = filemanagerNS.FileManagerCommand.extend({
          exec: function(options){
            var data = $("#fileManager").data("kendoFileManager").dataSource.data();
            
            console.log(options.data.name); // What I need to do here to get name with button custom?
          }
        });
</script>

Stark
Top achievements
Rank 1
Iron
Iron
 answered on 12 May 2021
1 answer
861 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
2 answers
229 views

 My OS language is Chinese. when I use the spreadsheet,  "kendo.culture.zh-CN.js" and  "kendo.messages.zh-CN.js" are introduced in our HTML page. But I find it does not worked as I expected, the message in the sheet  is still English.

 

Yours sincerely,

pansh

Martin
Telerik team
 answered on 12 May 2021
1 answer
356 views

Is there a way to allow user to edit connections path by interacting with points? Or is possible to make the connections does not passing through shapes? 

 

The "editable" option just allows user to change the start and end of connection, not the path, I need to allow user to change the path because Kendo Diagram does not has an option to prevent connections of passing through shapes.

Example: https://dojo.telerik.com/@rodrigo_x10/AGExALED

 

You can see that connection between 1 and 3 is passing through Shape 2, which is a bad visualization of data.

 

Edit:

- Each shape has specific connectors (they dont change)

- Each connection is a link between a specific connector to another specific connector (so cant ignore this option and let kendo change the start and end connector)

- What I want is allow the user to change the path of the connection without changing the start or the end

- I can add points to connections, but they are fixed, the user cant interact with points.

Rodrigo
Top achievements
Rank 1
Iron
 updated question on 11 May 2021
1 answer
522 views

Hi,

we want to persist the width of resizable columns, only.

We are aware of this article (https://demos.telerik.com/aspnet-mvc/grid/persist-state) and the getOptions() and setOptions() functions, but these get/set other options like sort and page.

We only want to persist the column width. Is there a supported way of doing this?

Kind regards.

Georgi Denchev
Telerik team
 answered on 11 May 2021
1 answer
996 views

In demo Pie Chart From kendo https://demos.telerik.com/kendo-ui/pie-charts/index

data: is created manual, but I want to read data from a url of type Json. 

Help me. Thanks.

                    data: [{
                        category: "Asia",
                        value: 53.8,
                        color: "#9de219"
                    },{
                        category: "Europe",
                        value: 16.1,
                        color: "#90cc38"
                    },{
                        category: "Latin America",
                        value: 11.3,
                        color: "#068c35"
                    },{
                        category: "Africa",
                        value: 9.6,
                        color: "#006634"
                    },{
                        category: "Middle East",
                        value: 5.2,
                        color: "#004d38"
                    },{
                        category: "North America",
                        value: 3.6,
                        color: "#033939"
                    }]
    <div id="chart" style="background: center no-repeat url('../content/shared/styles/world-map.png');"></div>
    
    <script>
        function createChart() {
            $("#chart").kendoChart({
                title: {
                    position: "bottom",
                    text: "Share of Internet Population Growth, 2007 - 2012"
                },
                legend: {
                    visible: false
                },
                chartArea: {
                    background: ""
                },
                seriesDefaults: {
                    labels: {
                        visible: true,
                        background: "transparent",
                        template: "#= category #: \n #= value#%"
                    }
                },
                series: [{
                    type: "pie",
                    startAngle: 150,
                    data: [{
                        category: "Asia",
                        value: 53.8,
                        color: "#9de219"
                    },{
                        category: "Europe",
                        value: 16.1,
                        color: "#90cc38"
                    },{
                        category: "Latin America",
                        value: 11.3,
                        color: "#068c35"
                    },{
                        category: "Africa",
                        value: 9.6,
                        color: "#006634"
                    },{
                        category: "Middle East",
                        value: 5.2,
                        color: "#004d38"
                    },{
                        category: "North America",
                        value: 3.6,
                        color: "#033939"
                    }]
                }],
                tooltip: {
                    visible: true,
                    format: "{0}%"
                }
            });
        }

        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
    </script>

Georgi Denchev
Telerik team
 answered on 11 May 2021
1 answer
109 views
Hi, I've been trying for quite some time now to expand the newly created row. So basically when I hit "add new" and hit update after it updates and inserts, then expand that new row.
Georgi Denchev
Telerik team
 answered on 11 May 2021
1 answer
324 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?