Hi,
I am displaying a container with a bunch of info, and I am using conditionals to make some of them appear if certain bools return true. This causes an issue with my formatting though because instead of going to a new line when the text appears, it actually appears next to the text that was already there. Is there a way to add a </br> on the binding of the text?
Basically the below checks if the variable exists is true, and if so it sets the variable string to "Success </br>" so that it will add a line break after the text "Success".
var
string =
null
;
if
(exists) {
string =
"Success </br>"
}
var
returnStatus = kendo.observable({
status: success
});
kendo.bind($(
"#status"
), returnStatus);
I need a default value for a field that I get from a datasource, and bind to that field using an observable. (That value can then be updated if needed by the user using a treeview). I can read the initial remote datasource, build the observable and bind the value to the field. I can then pop up a dialog, show a tree and return the values. What I cant seem to do is set the value of the observable because it is based on a datasource, and therefore seems to be a much bigger and more complicated json object which I am viewing in the console. I have also had to bind differently in order to get that working as well as shown below.
Below if just a snippet, but should give an idea. The remote data source returns just: {"name":"a name string"}
<p>Your default location is currently set to: <span id="repName" data-bind="text: dataSource.data()[0].name"></span></p>
<script>
$(document).ready(function () {
var personSource2 = new kendo.data.DataSource({
schema: {
model: {
fields: {name: { type: "string" }}
}
},
transport: {
read: {
url: "https://my-domain/path/paultest.reportSettings",
dataType: "json"
}
}
});
personSource2.fetch(function(){
var data = personSource2.data();
console.log(data.length); // displays "1"
console.log(data[0].name); // displays "a name string"
var personViewModel2 = kendo.observable({
dataSource: personSource2
});
var json = personViewModel2.toJSON();
console.log(JSON.stringify(json));
observName1 = personViewModel2.get("dataSource.data.name");
console.log("read observable: "+observName1);
kendo.bind($(''#repName''), personViewModel2);
});
After a lot of playing around, I managed to get the value to bind using: data-bind="text: dataSource.data()[0].name" but I can't find this documented anywhere. Where I output the observable to the console, I get a great big object, not the simple observable data structure I was expecting. I suspect I am missing something fundamental here! I am currently just trying to read the observable above, but can't get it to return the string from the json source.
I have a panel bar based on a remote data source which all works fine. One of the attributes in the feed combined with a form field on the screen will determine if either the user can click on a child item in the panelbar and navigate through to the url, or gets a warning dialogue and navigation fails.
I am using the following technique to capture the given json attribute in the feed and associate it with each item in the panel:
$("#panelbar").kendoPanelBar({
dataSource: haRepList,
template: "<span class=''repType'' data-url=''#= item.type #''>#= item.name #</span>",
select: function(panel){
var classId = $(panel.item).find(".repType").data(''url'');
if (classId !== ''undefined'') {
alert(classId);
}
},
dataTextField: ["name", "name"]
});
So when I click on the given item, I get an alert telling me what the type attribute is (just for debugging!). I now need to tell the panel "Do not allow the click through url to work" based upon both this value, and another field on the screen.
Hi!
I am using Kendo diagram on the client and we've managed to do it really easy.
But we had a request for generating the diagram image to include it in reports generated on the server.
Tried to search the API docs and forums for a solution but couldn't find any.
The current approach we're taking is to load kendo js lib into nodejs to generate the graph and save it. Our problem with this approach is that Kendo depends on jQuery and we can't seem to load it in a way that Kendo would know how to use.
Do you have any suggestion on our approach or a different approach on which we can achieve our result?
In the following example, the collapse and expand on the gantt tree list is not working: http://dojo.telerik.com/exIWoQeY
What am I missing?
Hi,
In TreeList i am enable Pageable and use dataBound
When fire first dataBound, data-uid is actual
then press refresh button and data-uid not updated in table
https://dojo.telerik.com/IgUwuYAn
In exemple first alert contains dataItem.LastName, then press button refresh, and dataItem not found, alert old data-uid
Hi,
Trying to deploy our Vue application we have noticed that our Vendor chunk is very big - and a large portion of it seems to be Kendo related. Even if we split our vendor file using the code below we create a giant progress file (3.5GB) that needs to be downloaded - and when we uncomment the console.log section - it seems that kendo-ui is the largest portion of the file - and it includes a lot of components (like spreadsheet, for example) that we do not need.
Do you have any suggestions how we limit the kendo components that are distributed when we do 'npm run build' - to just the ones we use?
--
configureWebpack: config => {
config.optimization = {
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
minSize: 0,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name (module) {
//get the name. E.g. node_modules/packageName/not/this/part.js
//or node_modules/packageName
let packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
//console.log(module.context + ' >>> ' + packageName);
//npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace('@', '')}`;
}
}
}
}
};
--
If we add a second line to break progress with:
if (packageName === '@progress') {
packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)(.*?)([\\/]|$)/)[3];
}
we see that kendo-ui is still gigantic (3.3GB) and contains stuff we do not use, for example spreadsheet, dataviz:
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\spreadsheet >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\util >>> kendo-ui
:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\dataviz\stock >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\dataviz\stock >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
Hello,
I use menu in toolbar as buttons with class k-icon
When i'm focus cursor on menu then icon changed to icon k-loading
Example: https://dojo.telerik.com/UXoGefaj/2
Error ocсure after update to kendo ui version 2019.2.619.