I'm working with local data and I began this by having an issue where hitting cancel on the edit popup removed a row that I added using the DataSource.add() method as described in the api for the add method (http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-add), and with the sync method (http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-sync).
After much investigation, I found that if I provided the ID defined in the model as part of the add() method and followed with a sync() method call, that the _pristineData property was not being updated properly.
See http://dojo.telerik.com/@aw232/OZuKA/2 for an example I created to illustrate what I mean. Clicking the “Click Me” button calls add(), including a value for the id as defined in the model ("ProductID"), followed by a sync() method call. The product appears to be successfully added to the grid, but clicking on edit and then cancel removes the row. This is because the _pristineData property is not updated after the sync(), so the DataSource reverts back to that data when the cancel event is called. Additionally, neither the Create nor Update Transports are being called.
However, if I don’t provide the ID, as defined in the model, the Create Transport function is called, and the _pristineData is being successfully updated when I called the sync() method. See http://dojo.telerik.com/@aw232/uKIji/2 for an example. The code here is identical to the first snippet, except that the model now uses “ID” as the id, which is not provided in the add() method. As you can see, the create transport function is successfully called and _pristineData is updated and thus, clicking cancel does not remove the row from the datasource.
I would expect that sync() would push the current data to _pristineData either directly, or by calling the Create or Update transports as necessary.
Please advise.
I'm trying to select a value in my DDL list via the WatiN browser control debugging tool...
Here is my input item:
<input id="ProviderList" name="ProviderList" style="width:400px" type="text" /><script>
jQuery(function(){jQuery("#ProviderList").kendoDropDownList({"dataBound":dataBoundProviderList,"dataSource":[{"Key":"001","Value":"001 Provider 1"},{"Key":"002","Value":"002 Provider 2"}],"dataTextField":"Value","dataValueField":"Key"});});
</script>
I tried the following without success to preselect the 2nd item in my unit test:
TextField providerListElement = Browser.TextField(Find.ByName("ProviderList"));
//via a jquery script from WatiN:
Browser.Eval("$\"#ProviderList\").data('kendoDropDownList').value(\"002\");");
// or another attempt via WatiN using jquery:
var dropdownlist = $(\"#ProviderList\").data(\"kendoDropDownList\"); dropdownlist.select(function (dataItem) { return dataItem.symbol === \"002\";});");
// and one more try:
Browser.Eval("$(document).ready(function() { " +
" var dropdownlist = $(\"#ProviderList\").data(\"kendoDropDownList\"); " +
" dropdownlist.select(function (dataItem) { return dataItem.symbol === \"02\"});" +
"}); ");
//also tried treating it as text field
providerListElement.Value = "002";
//as text field using simulated typing
providerListElement.TypeText("002");
Nothing seems to let the field change.
Any thoughts would be helpful!
Thanks,
Robert
Hi,
In Telerik UI for ASP.NET AJAX, the RadTreeView control shows dotted line that connects all nodes at the same hierarchical level. This visual aid is very helpful to identify all the sibling nodes in a large tree. Here's an example:
Is there a way to do the same in Kendo UI TreeView control?
Thanks!
I am trying to have a flag on state and flag off state and toggle between them. Referencing this http://demos.telerik.com/kendo-ui/navbar/adaptive-toolbar
The toprated icon seems to have an active state. When you click it the star fills in. I want when you click it to have it stayed filled in, and then when you click it again it goes back to the not filled in state.
I can't for the life of me figure out how to do it.
Hi
I'm wondering if it's possible to set the default operator of a second date filter different to the first. I would like the first filter operator to default to "After or equal to" and the 2nd operator to default to "Before or equal to".
Also, I require the fields in the filter date picker to be formatted as "dd/MM/yyyy". Where can I set that?
Kind Regards
Hi All,
I've started looking at a process of moving away from classic ASP.NET WebForms to a KendoUI approach.
I'm pretty much sold on using KendoUI as the UI but now need to work out the best data access approach. At the moment I am thinking that it would be nice to develop my REST API in a manner that I could use it on my existing WebForms application that runs to 400+ pages alongside the existing SQL database connections, gradually replacing them with REST versions.
So I am now left with a dilemma, finding the best approach for doing a REST API. So complex. I have seen some generator options including DreamFactory, Telerik Data Services (is this on the way out?) and a few others, each requiring a different level of understanding. Each seems to have their own pros and cons with nothing really seeming to tick all boxes. To further complicate things there seems to be several different technologies, such as OData etc.
Does anyone have any advice they could share with me on this?
In an ideal world I'm looking at some solution that is standards compliant, simple to setup, secure and integrates well with KendoUI, Webforms integration is a bonus but not essential as I could simply replace pages with KendoUI pages.
Regards
Jon