I am attempting to use the kendo-diagram control in a VueJS application. I have two data sources, one for the actual nodes/shapes, and one for the connections between the nodes.
The documentation is pretty sparse, and the sample that you provide only deals with a Hierarchical data source.
Based purely on a guess, I did the following:
<template>
<v-content>
<kendo-datasource
ref="nodes"
:data="dataSource">
</kendo-datasource>
<kendo-datasource
ref="connections"
:data="connectionsDataSource">
</kendo-datasource>
<kendo-diagram
:data-source-ref="'nodes'"
:connections-data-source-ref="'connections'">
</kendo-diagram>
</v-content>
</template>
<script>
import Vue from "vue";
import "@progress/kendo-ui";
import "@progress/kendo-theme-default/dist/all.css";
import {
DataSource,
DataSourceInstaller
} from "@progress/kendo-datasource-vue-wrapper";
import { Diagram, DiagramInstaller } from "@progress/kendo-diagram-vue-wrapper";
Vue.use(DataSourceInstaller);
Vue.use(DiagramInstaller);
export default {
data: function() {
return {
dataSource: [
{ id: "one", name: "One" },
{ id: "two", name: "Two" },
{ id: "five", name: "Five" }
],
connectionsDataSource: [
{ from: "one", to: "two", label: "plus one" },
{ from: "one", to: "five", label: "plus three" }
]
};
},
components: {
Diagram
}
};
</script>
I get the following error when running this page:
Error: Incorrect DataSource type. If a single dataSource instance is set to the diagram then it should be a HierarchicalDataSource. You should set only the options instead of an instance or a HierarchicalDataSource instance or supply connectionsDataSource as well.
What should I do in order to get both a data source, and connections data source bound to the diagram? Also, where can I find actual documentation for the VueJS implementation?
Thanks,
Stephan
My Gantt config is like this:
<
ganttdatasource
ref
=
"ganttdatasource1"
:transport-read
=
"ganttRead"
:transport-update
=
"ganttUpdate"
:transport-create
=
"ganttCreate"
:transport-destroy
=
"ganttDestroy"
:transport-parameter-map
=
"parameterMap"
:transport-submit
=
"ganttSubmit"
schema-model-id
=
"id"
:schema-model-fields
=
"fields"
>
</
ganttdatasource
>
<
ganttdependencydatasource
ref
=
"ganttdependencydatasource1"
:transport-read
=
"dependRead"
:transport-update
=
"dependUpdate"
:transport-create
=
"dependCreate"
:transport-destroy
=
"dependDestroy"
:transport-parameter-map
=
"parameterMap"
schema-model-id
=
"id"
:schema-model-fields
=
"dependencyFields"
>
</
ganttdependencydatasource
>
<
gantt
ref
=
"kendogantt"
id
=
"gantt"
:height
=
"500"
:editable-create
=
"true"
data-source-ref
=
"ganttdatasource1"
dependencies-data-source-ref
=
"ganttdependencydatasource1"
:assignments
=
"assignments"
:resources
=
"resources"
>
</
gantt
>
Then methods:
methods: {
dependRead: async
function
(options) {
console.log(
"dependRead!"
, options)
try
{
const links = await
this
.$axios.$get(................)
options.success(links)
}
catch
(ex) {
options.error(ex)
}
},
All works fine except that I get spurious calls to dependRead, in the console I see two or three logs for 'dependRead' every time the gantt loads.
If I remove the async/await code then I see only one call to dependRead as expected - so my question is, should I be using blocking or non-blocking handlers for this? async handlers are the correct approach by my thinking...
[Interestingly ganttRead uses exactly the same async mechanism but that is only ever called once]
Hello,
I have a question, as I can't find the answer in the documentation. Can we use the LocalizationProvider to print localized custom string, in the same way we can do it with VueI18n plugin ? Or the Localization feature is only for the Kendo components ?
I see this error when I'm going to convert data of treeview's datasource to stringify.
I use kendo vue js like :
JSON.stringify( ....data(
"kendoTreeview"
).dataSource.data() )
Hi all,
I would like to try Kendo Vue SpreadSheet wrapper component.
Because there is no native Vue SpreadSheet component at the moment.
I have tried somethings but I cannot run my example programs.
I have installed kendo-ui and spreadsheet wrapper (or any other wrappers).
When I run the program with npm run dev I got error below.
(I tried it on Windows 10 and Linux Ubuntu 22)
EDIT: I found this https://github.com/telerik/kendo-ui-core/issues/7238, but there is no solution addressed.
=========================================================================
Dear Telerik Admin,
I am using the Kendo Upload component to send a file to my server and in certain cases, it responds with null.
This causes the upload component to throw the following error:
"Uncaught TypeError: Cannot read property 'fileUid' of null
at parseSuccess (webpack:///./node_modules/@progress/kendo-ui/js/kendo.upload.js?:2105)
at tryParseJSON (webpack:///./node_modules/@progress/kendo-ui/js/kendo.upload.js?:2450)
at formDataUploadModule.onRequestSuccess (webpack:///./node_modules/@progress/kendo-ui/js/kendo.upload.js?:2131)
at XMLHttpRequest.eval (webpack:///./node_modules/@progress/kendo-ui/js/kendo.upload.js?:2037)"
Could you please let me know when this is fixed?
Kind regards,
Natasha
Hello!
I have a problem:
I was going to use kendo-grid with typescript. I use npm packages @progress/kendo-grid-vue-wrapper and typescript version ^2.9.2. When I used sample with localdatasource, I got the error:
vue.runtime.esm.js?2b0e:1819 TypeError: Cannot read property 'length' of undefined
at VueComponent.mounted (index.js?363d:39)
at callHook (vue.runtime.esm.js?2b0e:3025)
in this code @progress/kendo-base-components-vue-wrapper/dist/es/kendo-base-component/index.js?363d
mounted: function mounted() {
if (this.$el.classList.length > 0) { <-- $this.el is #comment node and does not have classList property
this.nativeClasses = [].concat(_toConsumableArray(this.$el.classList));
} else {
this.nativeClasses = [];
}