Hi,
i have problems with a json-based create method. Read is called and everything is displayed fine. But adding items does not trigger the create url. I tried adding new items wit id=0 or null or completely empty. But it is not working? What do I miss?
<script id="noDataTemplate" type="text/x-kendo-tmpl"> <div> No data found. Do you want to add new item - '#: instance.input.val() #' ? </div> <br /> <button class="k-button" onclick="addNew('#: instance.element[0].id #', '#: instance.input.val() #')">Add new item</button> </script><script> function addNew(widgetId, value) { var widget = $("#" + widgetId).getKendoMultiSelect(); var dataSource = widget.dataSource; dataSource.add({ name : value }); dataSource.sync(); } </script><script> $(document) .ready( function() { $("#title").kendoDropDownList(); $("#sex").kendoDropDownList(); var dataSource = new kendo.data.DataSource( { batch: true, transport : { read : { url : "http://XXX/tags?objectType=user", dataType : "json" }, create : { url : "http://XXX/tag/createForUser", dataType : "json", type: "POST" }, parameterMap : function(data, type) { if (type !== "read") { // send the created data items as the "models" service parameter encoded in JSON return { models : kendo .stringify(data.models) }; } } }, schema: { model: { id: "id", fields: { name: { type: "string" } } } } }); $("#tags").kendoMultiSelect( { filter : "startswith", dataTextField : "name", dataValueField : "id", dataSource : dataSource, noDataTemplate : $( "#noDataTemplate").html() }); /* $("#tags") .data("kendoMultiSelect") .value( /*[]*/ //[]); }); </script>
We recently encountered an interesting problem with the Scheduler.
Our current usage of the Scheduler has a month and day view. We currently support three statues per day for items scheduled i.e. (Booked, Open, Canceled). We would like to sort by Day the status in the following order, (Booked, Open, Canceled). So a sort was implemented at the database level to return the collection with each day's scheduled items in the order listed above.
The results in Chrome are not correct in the Month view when looking at a week at a time days which should have scheduled items sorted are not sorted as described above. However if you select just the Day View the scheduled items are sorted correctly. What makes the issue even more interesting is that if the same control is rendered in IE everything displays properly.
We have tried sorting at the client side and server side and each time the datasource is sorted properly but then renders improperly.
I did some further research on this issue and found the following forum posts:
http://www.telerik.com/forums/datasource-sort()-behavior-inconsistent-across-browsers
http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/sorting/stable-sort-chrome
Is there any work around to get the sorting results within the scheduler to sort properly in Chrome?
Hi,
I'm trying to make a indoor map viewer by using Kendo UI Map. The only problem is that the map is a single image and cannot be split into tiles. Is there any way to use a single non-tiled image for the map?
I have an issue with a theme I generated using the current ThemeBuilder tool at http://demos.telerik.com/kendo-ui/themebuilder/ . Here is what I did (please let me know if I did something wrong, as I did have to figure some steps out; the documentation is not as complete as I would have hoped).
Please follow those steps and see if you see the same issue. I would attach my files, but it would require all the folders and copies of the image files, and you already have all that. It's easier for you to just follow the steps and then you can verify the process on your end.
Thank you,
Chris
function
myValidatorFunc(input) {
console.log(
"VFunc: "
, input);
return
true
;
};
... [model definition] ...
complexField: {type:
"object"
,
validation: {myValidator:
function
(input) {
console.log(
"Input length: "
+ input.length)
return
myValidatorFunc(input);
}
}
I've got something like this in a grid with a custom edit template that lays out various fields. "complexField" is an array of objects, and while I'm not using fields nested inside that as actual grid columns, the custom editor seems able to bind to them. So the editor template might have among other fields, something like :
<
input
data-role
=
"numerictextbox"
data-bind
=
"value:complexField[0].intSubField1"
>
This seems to work, the binding displays and modifies "intSubField1" in element 0 of the data records "complexField" field. And the "myValidatorFunc()" function gets called for each field of the template, as expected. However, for certain fields, the "input" parameter (which is a jquery element) has length 0, instead of 1 (or greater?) - the input element that has just been tabbed out of is not being passed. So my "intSubField1" example might get passed to the validator, but for "intSubfield2" (done the same way), the valididator gets a 0-length "input" element, and I have nothing to access to do the validation.
Is there any legitimate case where a validator would get passed a zero-length "input" parameter? Could this happen if, say, there was a basic HTML5 validator like "required" set? This isn't the case here, and I would think the custom validator would just not get fired if basic validation failed first. Firing the validator with no input element to validate seems more like a bug, or lack of support for these sorts of complex bindings.
I'm trying to create an example on the dojo, but so far I can't get it to fail in a similar fashion - I'm going to keep trying to figure out what in our actual code I might not have translated to the simplistic example. We're getting this with 2016R3 and 2017R1SP1.
Hi All,
I am trying to get a site working after Kendo was upgraded from 2014.3.1119 to 2017.1.223. I carelessly updated a whole lot of NuGet packages at once, so Knockout, Durandal and a bunch of other things were also updated. I think I have all the dependencies right but I am still getting one error:
0x800a138f - JavaScript runtime error: Unable to set property 'ns' of undefined or null reference
This occurs at the line: kendo.ns = "kendo-"; See the attached screenshot.
I would infer that "kendo" is not defined but I can't see why it would not be. A very old backup version of the same code (referring to older versions of Kendo and knockout) is working fine.
Any suggestions would be welcome.
Thanks in advance,
Rob
I have a simple dropdown list that I'm attaching a viewModel to though the observable method.
<input class="span-full" data-role="dropdownlist" id="DROPDOWNONE" data-bind="events: {open: getProps }, value: '+ __cols[n].name +' ">
I'm binding it to an open function like so:
getProps: function(e){
console.log("who am i?");
}
What I want to do is when a user opens the menu with their mouse is to have the value of the id passed to it. Like so.
getProps: function(e){
// Code I'm missing goes here.
// var id = grabsomething.fromsomeplace();
console.log(id); // Outputs DROPDOWNONE
}
Please help. Thanks