kendo-ui

Kendo : ComboBox in a grid - Sending additional data of selected combobox to combobox Read()

房东的猫 提交于 2019-12-18 09:19:32
问题 ASP.NET MVC5 I have a combobox in a grid (InLine Edit): columns.Bound(x=>x.AccountID).EditorTemplateName("MyTemplate") Where MyTemplate is in /Shared There are millions of Accounts. When I try to edit the combo box in a grid and choose a new value, the ID of the Account, not the name, appears. This is because of course the name of the account is not immediately present so in the Read().Data() of the ComboBox.Datasource I need to send additional data ; the AccountID. My ComboBox Template looks

Getting Current Data from KendoUI TreeView

做~自己de王妃 提交于 2019-12-18 08:47:56
问题 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

How can I set and get the value of a dropdownlist in a grid in Kendo UI MVC?

别等时光非礼了梦想. 提交于 2019-12-18 02:46:48
问题 I'm working with KendoUI MVC in MVC3. I managed to get a dropdown in a grid column. But I have no clue on how to set the selected value, and when I save it doesn't save my selected value. The grid @using Perseus.Areas.Communication.Models @using Perseus.Common.BusinessEntities; <div class="gridWrapper"> @(Html.Kendo().Grid<CommunicationModel>() .Name("grid") .Columns(colums => { colums.Bound(o => o.communication_type_id) .EditorTemplateName("_communicationDropDown") .ClientTemplate("#:

Setting DateTimePicker to show specific time range e.g. working hours only

允我心安 提交于 2019-12-17 20:46:58
问题 I am trying to configure my kendoDateTimePicker to show 9am to 6pm only. Is this possible? 回答1: var startDateReference = $('.startDate').kendoDateTimePicker({ format: "dd-MM-yy HH:mm:ss", value : new Date(), }).data("kendoDateTimePicker"); startDateReference.timeView.options.min = new Date(2000, 0, 1, 7, 30, 0); startDateReference.timeView.options.max = new Date(2000, 0, 1, 18, 00, 0); This is working for me 回答2: With Kendo DateTimePicker you can select the min and max dates but not a time

Adding bindeable checkbox column to grid

自作多情 提交于 2019-12-17 17:40:13
问题 Have this column in a Kendo grid that currently display a MySQL Boolean value so we have either 1 or 0. Made this demo to play on... This in an autosync and inline:true grid. I would like this column to be of type "Checkbox" but, for some weird reasons, i just cannot find a demo or an example on the web that displays "enabled" checkbox that changes 1 to 0 when unchecked and Vice-Versa. 回答1: There are some previous considerations: When you click in a cell for editing you are switching it to

Kendo UI Grid Inserts/Updates create Duplicate Records (again)

纵然是瞬间 提交于 2019-12-14 04:25:55
问题 I have same problem as Daniel had in this topic, but his solution doesn't work for me: http://www.kendoui.com/forums/ui/grid/kendo-ui-grid-inserts-updates-create-duplicate-records.aspx#-jhxqRrNAUGsTFJaC-Ojwg So use-case. Users adds 2 new records one after another: Presses "Add new record" button of a grid Fills the fields (name="Alex", amount=10, comment="first"). Record one is ready. Press 'Save'. (data goes to controller and than to Database) User see one record in a grid Press "Add new

KeyPress on input not worked

半腔热情 提交于 2019-12-14 03:58:25
问题 I need create keyPress (enter) binding for input. <div id="body"> <input type="text" data-value-update="keyup" data-bind="value: text, keyPress: onKeyPress"/> <div id="output"></div> </div> js: kendo.data.binders.widget.keyPress = kendo.data.Binder.extend({ init: function (element, bindings, options) { kendo.data.Binder.fn.init.call(this, element, bindings, options); var binding = this.bindings.keyPress; $(element.input).bind("keypress", function (e) { if (e.which == 13) { binding.get(); } })

Kendo AutoComplete Not Displaying

元气小坏坏 提交于 2019-12-14 03:51:34
问题 I have a custom editor that I use with autocomplete. The web service is getting called and returning the data. However, nothing is diaplying in the editor. I put a breakpoint in schema.parse() but it's never hit. What am I missing? function myAutoCompleteEditor(container, options) { $('<input data-text-field="Name" data-value-field="Name" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoAutoComplete({ autoBind: false, suggest: true, delay: 500, dataSource: new kendo.data

Prevent removing unnecessary white spaces in Kendo Editor

旧时模样 提交于 2019-12-14 03:22:25
问题 I'm using Kendo Editor to insert code snippets to content and it works very well, but when I want to change this formatted code, editor removes unnecessary white spaces, but in my use-case it's wrong. Have you any idea hot wo fix it? Print screen with new text in editor Print screen with edited text - wrong behaviour. Thank you guys. 回答1: Ok, I'm not found solution, but I found workaround - I'm inserting code into editor by <pre class="code">...</pre> and kendo stripps unnecessary white

kendo ui grid looses selection when bound value changes

╄→尐↘猪︶ㄣ 提交于 2019-12-14 02:41:04
问题 It seems like the grid widget looses selection when a value that a column is bound to is changed. Does anyone know how to not loose the selection? Example here (select a row then click "click here"): http://jsbin.com/oyuher/1/edit 回答1: Yes, the Grid is refreshed and any selection is lost. In this code library you can get the idea how to persist the selection. Basically there is a cookie which is used but since you do not reload the page you can simply safe it into a JavaScript variable. 来源: