kendo-ui

Getting Current Data from KendoUI TreeView

随声附和 提交于 2019-11-29 14:45:49
I'm using a kendo UI tree with a remote data source from a JSON file. I have a button on the tree page which gets the current data of the tree,sends it through a POST to a server and the server saves the current data to the JSON file so as the next time I reload the page,the changes I made will be kept.That's what I want to happen. So I know the current data of the tree is in: $("#treeview").data("kendoTreeView").dataSource.data() Which means the data changes real time in there for example when someone drag and drops a node of the tree. My problem starts when this data doesn't seem to change

How to disable past dates without hiding them in Kendo date picker?

点点圈 提交于 2019-11-29 14:38:24
If I set min value for the date picker, it does not display dates less than min date when it's opened. My requirement is that dates less than min date should be shown in the date picker, but they should be disabled. You can make it with CSS styles and using custom content in Kendo datepicker. HTML: <input id="datepicker" style="width:150px;" /> CSS: .disabledDay { display: block; overflow: hidden; min-height: 22px; line-height: 22px; padding: 0 .45em 0 .1em; cursor:default; opacity: 0.5; } JavaScript: $(document).ready(function() { disabledDaysBefore = [ +new Date("10/20/2014") ]; var p = $("

Kendo grid batch editing - making a single call to save

旧时模样 提交于 2019-11-29 14:34:09
问题 With Kendo grid batch editing turned on, I know that you can hook into the create, update and destroy commands where Kendo will send 3 separate commands to the server when you click on Save Changes. I was wondering if there was any way to send all three sets of updates as a single call to the server -like a transaction. Or even send each in a specified order, with a check for success before sending the next . The only way I could come up with was to have a custom Save Changes implementation

How to change the value of a kendo bound html input

半城伤御伤魂 提交于 2019-11-29 13:58:16
I have a kendoui grid with a custom popup for editing. In this popup I have an input which is bound to a value of the grid: <input type="text" class="k-input k-textbox" id="test" data-bind="value:SearchFilter"> This works fine. Click edit in the grid, change the value in the textbox and the value propagates to the grid. But now I want to change the value of the textbox in javascript.. So I now have this: $('#test').val("testvalue"); This indeed changes the value of the textbox, but upon save the new value isn't propagated to the grid. I guess because no change event occurs on the textbox. How

How do you extend Kendo UI widgets

旧巷老猫 提交于 2019-11-29 13:46:43
问题 I couldn't find any official documentation about extending Kendo UI widgets or making composite controls on Kendo UI's website. Are there any examples of how to do this? 回答1: I'm about to write a post on this, but you can checkout the following project on GitHub for creating plugins. Currently there is a composite control for this... https://github.com/kendo-labs/kendo-plugins Here is a live fiddle example of a compositing an AutoComplete and a ListView... http://jsfiddle.net/burkeholland

How to handle a Kendo UI Grid row double-click event

怎甘沉沦 提交于 2019-11-29 13:24:17
问题 I have a selectable KendoUI grid in my MVC app. I want to do something when the user double-clicks on the grid. I don't see a double-click event for the grid. How may I handle the double-click event when there is none exposed? 回答1: Use the standard double click event. The first click will select the grid row, adding a .k-state-selected class to it, and the second click will trigger the double click event. $("#yourgridname").on("dblclick", "tr.k-state-selected", function () { // insert code

Kendo scheduler resources paging

做~自己de王妃 提交于 2019-11-29 13:03:14
in kendo scheduler control am using group header template and would like to make a paging in my resources view http://dojo.telerik.com/IMUjA this example has 2 only resources if I would like to add 2 another resources I want to show only 2 resources per page and would like to have next/prev buttons to change resources viewed as paging in scheduler displaying I want something such as the example I made in this link: dojo.telerik.com/uBigO/4 I would like to control my resources to view configured number of the resources cause the pagination method is not supported in Kendo scheduler as a feature

Javascript runtime error: “object doesn't support property or method” in Internet Explorer

岁酱吖の 提交于 2019-11-29 12:59:42
I'm using kendo grids and they work fine for the CRUD operations. Now, I wanted to add filtering by adding the .Filterable() option to the grid's specification. Here's some code: <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title("Code"); columns.Bound(c => c.Description).Title("Description"); columns.Bound(c => c.TrafficOpeningDate).Title("Traffic Opening Date"); columns.Bound(c => c.CreationDate).Title("Creation Date"); }) .HtmlAttributes(new { style = "height: 534px;" }) .Filterable()

Remember expanded detail grids on refresh in Kendo-UI

安稳与你 提交于 2019-11-29 12:31:41
I have a scenario with grid within grid implemented using the detailInit method. Here when user makes edit, i do some calculations that will change the data in the both parent and child. and then to refresh data, i will call the datasource.read to render data. this works and the data is displayed, however any detail grid which are expanded will be collapsed, is there any way i can prevent this from happening. To answer this and another question: "I figured out how to set the data in the master from the child BUT, the whole table collapses the child grids when anything is updated, this is a

Get a reference to Kendo Grid from inside the error handler

ⅰ亾dé卋堺 提交于 2019-11-29 12:29:00
问题 There already are questions how to get custom error handling, with answers, but all those answers use 'external' reference/selector to the grid to make it work, for example: function onError(e) { if (e.errors) { var message = "Error:\n"; var grid = $('#gridID').data('kendoGrid'); // <<- here (...) } Is it possible to get the reference to the grid from inside the error handling function without providing the selector by hand or 'externally' (because global variables are meh )? That way the