I am having a problem while refreshing the kendo grid, for some reason, the dataBound event is activated twice, does someone know what could be the problem? or is this a normal behavior?
$("#grid").data('kendoGrid').dataSource.read();
$("#grid").data('kendoGrid').refresh();
UPDATE:
if i remove the refresh line, the dataBound happens only once
$("#grid").data('kendoGrid').refresh();
Try to give false to autobind and try again.
http://docs.telerik.com/kendo-ui/api/web/grid#configuration-autoBind
If you're simply wanting to update the data, you shouldn't need to call Refresh(). DataSource.Read() should do.
You can remove the below lines to:
$("#KendoGridId").data("kendoGrid").dataSource.read();
$("#KendoGridId").data("kendoGrid").dataSource.page(1);
to:
$("#KendoGridId").data("kendoGrid").dataSource.read();
Related
Kendo treelist in angular js lost row color after expand and collapse operation.
Please check attached link for more details.
http://dojo.telerik.com/enEqE
Got the answer from telerik itself. Its required to add the code on expand event and also required to wrap it inside the settimeout function.
Here is the updated dojo.
http://dojo.telerik.com/UTocid
I'm trying to use a kendo.data.ObservableArray as data for data source of the grid. It shows ok. When edit inline, change a field, then cancel, the values are changed. When clicking edit, then click edit on another row, the last one remains in the edit mode. Sometimes cancel not work. On the array it works as expected.
I took the Kendo UI Demo, http://demos.telerik.com/kendo-ui/grid/editing-inline, to reproduce the issue. Here is the issue: http://dojo.telerik.com/uLiCi/2
Does anyone have any idea why so strange behavior?
In my opinion, it should work with both, array and observable array.
Thanks in advance
Two problems:
1.)
e.preventDefault() doesn't work correctly with Kendo UI TabStrip when somewhere
$("#tabstrip").kendoTabStrip().data('kendoTabStrip');
appears.
2.)
Imagine the User clicks on another tab, but has unsaved changes.
A dialog pops up and ask if he wants to discard the changes and go to the tab or
if he wants to stay on the active tab to save his changes.
My solution doesn't work. Because of the 1. Problem I guess and because
.data() somehow reinitialises the TabStrip?! What is wrong?
Here is a (not) working example
http://jsfiddle.net/Nakkvarr/w9586/
Any ideas on this issue?
The reason it doesn't work for the first tab is because you initialized the tab strip twice on the same element $('#tabstrip'). Since you bound the select event on the first initialization, the subsequent initialization overwrote it (the select event isn't handled anymore). You even answered the problem yourself by stating that it works if you comment the second initialization line out.
I'm not entirely sure what you're trying to accomplish with the setTimeout() function in the second example. It's unnecessary.
Using e.preventDefault() works as expected. JSFiddle: http://jsfiddle.net/w9586/6/
I've noticed that when a validation error occurs, the user is locked into that cell until the error is resolved. Is there a way to allow the user to continue to navigate cells?
This approach works for me b/c I don't commit when they leave the cell, but wait until they click a Save button. So, this button would be disabled while an error exists, but they are still free to navigate cells. Thank you.
You need to implement your own editorLock function, that is passed to options. This feature, just as most of SlickGrid, is poorly documented, ut you can watch through source code of SlickGrid, and search for function called commitCurrentEdit.
The example of editorLock is in the file slick.core.js
Also, before rendering the grid you can try to do this:
Slick.GlobalEditorLock.commitCurrentEdit = function(){
return true;
}
I'm using the Telerik RadComboBox control. I have two related combos and when the user selects a value in the first one I filter the second one.
I use the code below to achieve this:
localeCombo = $find("<%= ddlLocale.ClientID %>");
localeCombo.requestItems(item.get_value(), false);
This works totally fine, but when I do a postback my filtered combo resets to the original non filtered list, although all other controls retain their state. I assume this is because the server side list of items is not being updated when I use the client side callback requestItems() function.
Is this the case? Is there a simple way around this?
Any help would be much appreciated!
Thanks
Chris
Yep, most probably your suggestion is true. You may try keeping the second filtered combo value in session or cache storage and then restore it from there on postback - at least this is what I would do.
This is a bug with RadComboBox. I opened a ticket.