kendo-ui

How to populate Kendo grid with an angular $http GET call

佐手、 提交于 2019-12-02 21:22:13
I'm having trouble binding a Kendo grid to an angular service call. I have an angular $http service that has a getData() method which looks like this: 'use-strict'; payrollApp.factory('dataService', function ($http, $q) { return { getData: function () { var deferred = $q.defer(); $http({ method: 'GET', url: '/api/apihome/', }).success(function (data, status, headers, config) { deferred.resolve(data); }).error(function (data, status, headers, config) { deferred.reject(status); }); return deferred.promise; }, }; }); I then set the grids DataSource in my controller as follows: 'use-strict';

Kendo Grid Edit InLine Custom Validation message e.g. for duplicate Names etc

假如想象 提交于 2019-12-02 20:57:45
I have an entity Location and I am using the Kendu UI Grid with InLine edit mode. The entity owns a property DisplayName , which is required and must not exist twice in the database. At the moment, it works to display the Required Validation message: And it also works to build up a method CustomValidateModel called in the LocationController Ajax InLine Create method, that checks if the Name is already existing in the database and adds then a ModelError . I catch this error then in the .Events(events => events.Error("onError")) via javascript and show then the message via javascript popup.

Kendo DatePicker fails validation for custom date format

天大地大妈咪最大 提交于 2019-12-02 20:31:42
I'm using Kendo DatePicker to edit a Date field being displayed in a Kendo Grid in my ASP.NET MVC 4 project. In order to have the DatePicker being used for the Date field use custom date format string, I updated the Date.cshtml file under the EditorTemplates folder to the following: @(Html.Kendo().DatePickerFor(m => m).Format("dd/MM/yyyy")) By doing that, I managed to have the DatePicker display the format as I want it to. However, it failed validation for some of the dates entered for input, either via manual key in or selection from the popup calendar. Upon further investigation, I can say

kendo ui Editable color input field on grid

谁都会走 提交于 2019-12-02 19:49:15
问题 As you can see in the code below, i have a grid with editable cells. At the column named "szin" i tired to implement a kendo colorpicker and it works just fine. My problem is, that the colors are only displayed when you try to edit one of the cell. Can i make it permanently displayed somehow? I dont care if the bg-color of the cell change or the dropdown box visible all the time or with any other methods. Here's my code: <!DOCTYPE html> <html> <head> <link href="../styles/kendo.metro.min.css"

Rendering data in kendo scheduler control header - dateHeaderTemplate

限于喜欢 提交于 2019-12-02 19:44:07
问题 I am using Scheduler control from Kendo. I am trying to render daily capacity (Hard coded 30% now) in header of each day as shown in below screen. How can I replace hard coded by data from datasource? Here is the code I have used. I have HARD CODED 30% in below code. <!DOCTYPE html> <html> <head> <style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style> <title></title> <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.common-material.min

How to use Kendo UI Grid with ToDataSourceResult(), IQueryable<T>, ViewModel and AutoMapper?

我的未来我决定 提交于 2019-12-02 19:34:02
What is the best approach to load/filter/order a Kendo grid with the following classes: Domain: public class Car { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual bool IsActive { get; set; } } ViewModel public class CarViewModel { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual string IsActiveText { get; set; } } AutoMapper Mapper.CreateMap<Car, CarViewModel>() .ForMember(dest => dest.IsActiveText, src => src.MapFrom(m => m.IsActive ? "Yes" : "No")); IQueryable var domainList = RepositoryFactory

Remove legend color boundary

巧了我就是萌 提交于 2019-12-02 18:53:44
问题 I have the following implementation. It works and functional. However, I want to remove legend color boundary which is black. I could not able to figure out how? var marker = new kendo.drawing.Path({ fill: { color: color } }).moveTo(10, 0).lineTo(10, 10).lineTo(0, 10).lineTo(0,0).close(); http://jsfiddle.net/1ost124j/3/ 回答1: You can set the stroke ( border color ) same as you set the fill var marker = new kendo.drawing.Path({ fill: { color: color }, stroke: { color: color } }).moveTo(10, 0)

kendo.widgetInstance throws exception TypeError: t is undefined

喜欢而已 提交于 2019-12-02 18:50:08
问题 I'm trying to use kendo.widgetInstance() to get an instance of a kendo control: $.each($('#AttributeForm').find(':input'), function(index, element) { if ($(element).closest('.k-widget').length > 0) { var widgetObject = kendo.widgetInstance($(element), kendo.ui); if (typeof widgetObject != 'undefined') widgetObject.enable(false); } }); However, the kendo.widgetInstance() function is always throwing an error, TypeError: t is undefined. This code is adapted from the following page: http://docs

Kendo UI Window overlay opacity

核能气质少年 提交于 2019-12-02 18:33:10
问题 How can I set overlay opacity with CSS. I tried .k-overlay { opacity:0.9; } but it wont work. Can anyone help me? here I provide a simple demo 回答1: .k-widget would be a too broad selection. You can set the opacity for that very window once the window will be shown: <script> function onOpen() { setTimeout(function(){ $("#dialog").parent().css("opacity", 0.2); }, 10); } $("#dialog").kendoWindow({ modal: true, open: onOpen }); </script> 回答2: You could try .k-overlay { opacity:0.9 !important; }

How to get the month names in kendo chart by using function

孤街醉人 提交于 2019-12-02 18:10:02
问题 How to create a function to get the month as Jan,feb.. displayed in kendo chart x axis. var internetUsers = [ { "Month": "1", "year": "2010", "value": 1 }, { "Month": "2", "year": "2010", "value": 2 }, { "Month": "3", "year": "2010", "value": 3 }, { "Month": "4", "year": "2010", "value": 4 }, { "Month": "5", "year": "2010", "value": 5 }, { "Month": "6", "year": "2010", "value": 6 }, { "Month": "7", "year": "2010", "value": 7 }, { "Month": "8", "year": "2010", "value": 8 }]; function