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
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
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>
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
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
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.
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.
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>
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