kendo-ui

How to validate a date is in the format yyyy-MM-dd using kendo validator?

六月ゝ 毕业季﹏ 提交于 2019-11-29 22:02:03
问题 I have a kendo date picker that is constructed as follows: $("#date").kendoDatePicker({ format: "yyyy-MM-dd", footer: " ", parseFormats: ["MM/dd/yyyy", "dd/MM/yyyy"] }); I would like to use the kendo validator to validate that the date contains a valid date in the format of yyyy-MM-dd. I have tried this: <input type="date" id="date" placeholder="yyyy-mm-dd" name="date" required data-required-msg="Please enter a date." data-date-msg="Please enter a valid date."/> While the validator does

Combobox Cascading need more specific cascadeFrom option

家住魔仙堡 提交于 2019-11-29 21:12:44
问题 I want to use the cascadeFrom feature of the Kendo UI ComboBox, but to my dismay it seems that that option will only accept an ID. Now I can't use the ID because the combobox is added dynamically and possibly multiple times resulting in multiple controls with the same ID. Does anyone have any ideas on how I can either pass a specific dom object to the cascade or how I could possibly setup a custom cascade feature using the 'change' event? 回答1: That cascading functionality is just some sugar

how to get selected row value in the KendoUI

安稳与你 提交于 2019-11-29 19:32:13
I have a kendoUI grid. @(Html.Kendo().Grid<EntityVM>() .Name("EntitesGrid") .HtmlAttributes(new { style = "height:750px;width:100%;scrollbar-face-color: #eff7fc;" }) .Columns(columns => { columns.Bound(e => e.Id).Hidden().IncludeInMenu(false); columns.Bound(e => e.EntityVersionId).Hidden().IncludeInMenu(false); columns.Bound(e => e.Name).Width("70%").Title("Entity Name"); columns.Bound(e => e.EIN).Width("30%"); }) .ToolBar(toolBar => toolBar.Template("<a class='k-button k-button-icontext k-grid-add' id='addEntity'><span class='k-icon k-add'></span>Entity</a>" + "<a class='k-button k-button

manually maintain dirty cell marker on paging in Kendo grid

て烟熏妆下的殇ゞ 提交于 2019-11-29 19:29:37
问题 I have an editable Kendo grid where I can edit a cell and the grid adds the red mark to the upper left hand corner of the cell. I go to another page and then come back to the page where the edit took place and the red mark is gone but the newly added value in the cell remains. I saw a response to this on the Kendo site where it was advised that: "In order to show the "dirty flag" every time the grid is rebound it will have to iterate through all the model, check all fields if changed and

Tooltip Template Formating in Kendo-UI

被刻印的时光 ゝ 提交于 2019-11-29 17:27:34
I have the following code, and initially my data consists only x and y values, however, once I added another value which is k but it stopped working. I am planning to display k value as an additional information into tooltip. Does anybody has any idea? function createChart() { $("#chart") .kendoChart({ xAxis: {}, yAxis: {}, seriesDefaults: {type: "scatterLine" }, series: [{data: stats}], tooltip:{visible:true,template: "#= myTooltip(value) # "} }); } function myTooltip(value) { return Math.abs(value.x) + ", "+Math.abs(value.y)+","+Math.abs(value.k); } http://jsfiddle.net/3yhbyy2g/49/ Finally,

Filtering source in a Kendo Template

落花浮王杯 提交于 2019-11-29 17:25:54
I have following Kendo template and MVVM binding. Source for this is template is viewModel that has employees inside it. The employees collection has 3 records in it. I need to display only those records for which the IsSelected property is true. <!----Kendo Templates--> <script id="row-template" type="text/x-kendo-template"> <tr> <td data-bind="text: name"></td> <td data-bind="text: age"></td> </tr> </script> employees: [ { name: "Lijo", age: "28", IsSelected: true }, { name: "Binu", age: "33", IsSelected: false }, { name: "Kiran", age: "29", IsSelected: false } ] QUESTION How can we specify

Javascript - How to add objects to column array in kendo ui grid dynamically?

半世苍凉 提交于 2019-11-29 17:04:13
I am trying to generate objects in the columns array as the heading implies, although I haven't found a working method. alert( "Value 1: " + temporaryArray[1] + " - " + finalArray[1].values ); alert( "Value 2: " + temporaryArray[2] + " - " + finalArray[2].values ); var myGrid = $("#grid").kendoGrid( { columns: [ { title: temporaryArray[0] + " ", field: gridArray[0].values + " " } ], dataSource: { data:finalArray, pageSize:10 }, scrollable:false, pageable:true }); I've tried the following to add the object: for( var x = 0; x < finalArray.length; x++ ) { myGrid[columns] = { temporaryArray[x]

Formatted HTML data in Kendo grid column

喜夏-厌秋 提交于 2019-11-29 16:59:12
问题 Hi I have a Kendo Grid created in jquery with following code: Kendo Grid: $('#divFolderNotes').kendoGrid({ dataSource: data batch: true, columns: [ { field: "Text", title: "Note Text" }, { field: "CreatedByDisplayName", width: '190px', title: "Created By" }, { field: "CreatedDateTime", width: '190px', title: "Created Datetime" }, ], scrollable: true, sortable: true, reorderable: true, resizable: true, height: 250, selectable: "row", autoSync: true, editable: true,// "inline", navigatable:

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

对着背影说爱祢 提交于 2019-11-29 16:44:38
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 like this: .DataSource(source=> source.Read(read => read.Action("ReadAccounts".....) .Data("HERE IS

Kendo Grid Foreign key column bind dynamically

ⅰ亾dé卋堺 提交于 2019-11-29 15:23:20
问题 @(Html.Kendo().Grid((IEnumerable<Doc.Web.Models.Common.ContactModel>)Model.contact_lst) .Name("grid") .Columns(columns => { columns.Bound(o => o.ContactID).Visible(false); columns.Bound(o => o.ContactName).Title("Contact Name"); columns.ForeignKey(p => p.CPOID, (System.Collections.IEnumerable)ViewData["CPOs"], "cpo_id", "contract_po") .Title("Company - Contact/Purchase Order"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(182); }) .ToolBar(toolbar => toolbar.Create