You used to be able to upload the variables.scss file to work on an existing theme. Now, it's asking for a json file. Is there a workaround for this?
from Themebuilder now:
from the Documentation:
I added a custom template for the Upload Widget. The file size (#=size#) prints to a byte value. How can I format the file size (#=size#) to print in KB instead of Bytes - and with two decimals? (like the upload widgets default)
I added the template as a function, as mentioned here.
Thanks for any advice!
Patrick
I have a product named "a6763". It is a cloud based product. Customers use it by placing CDN-served assets into their HTML code. My product should work in an div only. It is just like Google Map actually. Google Map never affects rest of document. I plan to use Kendo UI jQuery for windows, dropdowns, tabs etc. But Kendo UI affects rest of document.
Here is how my customers add my assets:
1) Embed the a6763's code.
<head>
<script src="https:/a6763.com/embed/kendo.js"></script><link href="https:/a6763.com/embed/kendo.bootstrap.min.css" rel="stylesheet" />
</head>
2) Place my embed code:
<body>
<!-- there is no kendo here -->
<div id="a6763">
<!-- my kendo UI components are here -->
<div id="kendogrid"></div>
</div>
<!-- there is no kendo here -->
</body>
The problem is that; the Kendo's Javascript codes and CSS styles affect all the document. For example, if I choose Material theme in CDN assets, then all the page turns into Material. But I want to keep this theme in the above div. Same for Javascript codes: Kendo should not process outside of the above div.
UPDATE 1: To make it more clear: I need something like this for Kendo UI jQuery: https://github.com/cryptoapi/Isolate-Bootstrap-4.1-CSS-Themes
UPDATE 2: In other words, I need give Kendo a new name just like this: https://api.jquery.com/jquery.noconflict/ So that, even the document already added a different version of Kendo into document, everything is ok because my Kendo is different. No conflict.
Esref Atak
Attempting to move a scheduler event when grouping by a resource with a remote data source produces the following console errors.
Uncaught TypeError: Cannot read property 'value' of undefined
Cannot read property 'groupIndex' of undefined
All events are unable to moved unless I double click an event and open it's edit menu first thing upon the scheduler data being bound and before taking any other action in the scheduler.
Both the scheduler data source and the resource data source are remote; however, when I hard-code the resource data source to match what the remote output would be, the scheduler works as intended.
Here's what my scheduler initialization code looks like.
$(function() {
var dataSource = new kendo.data.SchedulerDataSource({
transport: {
read: {
url: 'service url', /* omitted for example */
type: 'GET',
data: {
account_id: 'myAccountId'
},
dataType: "json",
beforeSend: function(req) {
req.setRequestHeader('example-api-key', '1234');
}
},
update: function(e) {
e.success();
}
},
schema: {
data: "schedulerEvents"
}
});
$("#scheduler").kendoScheduler({
date: new Date(),
toolbar: [ "search" ],
eventHeight: 50,
selectable: true,
views: [
"day", "week", "month", "agenda", {type:"timeline", selected: true}, "timelineWeek", "timelineMonth"
],
dataSource: dataSource,
group: {
resources: ["Assignees"],
orientation: "vertical"
},
resources: [
{
field: "assignees",
title: "Assignees",
name: "Assignees",
dataSource: {
transport: {
read: {
url: 'service url', /* omitted for example */
type: 'GET',
data: {
account_id: 'myAccountId'
},
dataType: "json",
beforeSend: function(req) {
req.setRequestHeader('example-api-key', '1234');
}
}
},
schema: {
data: "assignees"
}
},
multiple: true
}
]
});
});
The response data from the server looks like this:
{
assignees: [{ value: "1234", text: "Assignee Name" }],
schedulerEvents: [{ assignees: ["1234"], id: "9876", title: "Event Title", start: "2021-05-27T00:00:00", end: "2021-5-28T00:00:00" }]
}
You'll notice in my screenshot that the events appear to be grouped correctly, but nonetheless produce errors when clicking on them or trying to move them.
At a loss as to what may be causing this. Perhaps I'm missing something when it comes to binding remote data. Please let me know if there's anything I can do to solve this issue.
<
div
class
=
"container"
id
=
"list"
data-role
=
"listview"
data-bind
=
"source: data"
data-template
=
"list-tmpl"
/>
<
script
id
=
"list-tmpl"
type
=
"text/x-kendo-template"
>
<
div
class
=
'row'
>
<
div
class
=
"input-append bootstrap-timepicker"
>
<
input
type
=
"text"
class
=
"input-small timepicker"
data-bind
=
"value:StartTime"
required />
<
span
class
=
"add-on"
><
i
class
=
"icon-time"
></
i
></
span
>
</
div
>
</
div
>
</
script
>
var items = $(".timepicker");
$.each(items, function () {
var el = $(this);
el.timepicker({
minuteStep: 1
});
});
var tmpl = kendo.template($('#list-tmpl').html());
var results = kendo.render(tmpl, e.model.data);
this.editable.element.data("kendoWindow").element.find("#list").html(results); // populate the listview
var items = $(e.container).find(".timepicker");
$.each(items, function () {
var el = $(this);
console.log(el);
//el.kendoTimePicker();
el.timepicker({
minuteStep: 1
}).on('show.timepicker', function (e) {
console.log(e);
});
});
Hi guys,
i have mediaplayer inside kendo window. now the problem is when you open the kendo window and play the video and then close it. The video keeps on playing in the background. How can i stop it from playing?
<
script
type
=
"text/javascript"
>
/* Date:2021-04-13
* Description: The pop up gets called from a click event of toolbar button(custome button on the CIP grid) called,
* "How to create/fill in a CIP?" through javascript function called pop();
*
* */
function Pop(e) {
/*
* kendow window initiated/created on click of toolbar button called "How to create/fill in a CIP?"
* */
$("#CIPSTRAINING").kendoWindow({
width: "40%",
height: "40%",
modal: true,
iframe: false,
close:onClose,
resizable: true,
dragable: true,
content: "",
visible: false
});
/*The Window provides the wrapper and element DOM elements as fields of its object which you can access and use to customize its appearance and content.
* Even though the handling of the position and size of the Window is normally done through its API and the setOptions method,
* you can also utilize wrapper to tweak the position or the size of the widget.
* * */
var windowElement = $("#CIPSTRAINING").data("kendoWindow");
// windowElement.wrapper.addClass("overflow:" ,"hidden");
/*
* initialize the mediaplayer referencing its dom element
* */
$("#mediaplayer").kendoMediaPlayer({
autoPlay: true
});
/* set and get the data items to the datsournce and assign it to the videos variable. which later we use it to the listview datasource.
* */
var videos = new kendo.data.DataSource({
data: [{
},
]
});
var listView = $("#listView").kendoListView({
dataSource: videos,
selectable: true,
scrollable: false,
template: kendo.template($("#CIPStemplateTraining").html()),
change: onChangeTrain,
dataBound: onDataBoundTrain
});
<
script
type
=
"text/x-kendo-template"
id
=
"CIPStemplateTraining"
>
<
li
class
=
"k-item k-state-default"
onmouseover
=
"$(this).addClass('k-state-hover')"
onmouseout
=
"$(this).removeClass('k-state-hover')"
>
<
span
>
<
img
src
=
"#:poster#"
/>
<
h5
>#:title#</
h5
>
</
span
>
</
li
>
</
script
<script>
function onClose(e) {
debugger;
var windowElement = $("#CIPSTRAINING").data("kendoWindow");
// get a reference to the media player widget
var mediaPlayer = $("#mediaplayer").data("kendoMediaPlayer");
// Stop the video
var listView = $("#listView").data("kendoListView");
windowElement.refresh();
mediaPlayer.stop();
}
function onChangeTrain() {
var index = this.select().index();
var dataItem = this.dataSource.view()[index];
$("#mediaplayer").data("kendoMediaPlayer").media(dataItem);
}
function onDataBoundTrain(e) {
// this.select(this.content.children().first());
}
</
script
>
also i get this error "Uncaught TypeError: Cannot read property 'removeClass' of undefined" when i use the close code that i have
kind regards
Tony
I have a server side update service that does validations. I'd like to see an example of a failed update response message and grid config that gives an error on a field with a message. I saw some questions on this years ago in the forum as associating an error with a cell or row was not possible at the time. Hopefully that has changed.
Steve
Welcome,
I've got a grid , with grid row details like here:
https://demos.telerik.com/kendo-ui/grid/detailtemplate
also each grid ( "master" and "details") have a checkbox select column like here
https://demos.telerik.com/kendo-ui/grid/checkbox-selection
My grids have local javascript variable (array) which is bound, in master with filter "ParentId == null" , in details "ParentId == e.data.Id".
What I need is to get (for example on "onChange" event) all Id's which are selected. When i use the this.selectedKeyNames() i get Id's only from one specific grid.
Hi team,
When kendo editor is embedded in a <form> with other input fields, pressing enter in a field triggers the first button in editor toolbar (maybe because the editor buttons don't have the type=button attribute ?!).
You can try that on this same form: pressing enter in Subject field will trigger the bold button.
Please advise on this.
Thank you.
Laurent.