kendo-ui

Changing the color of onclick selected text in kendo angular grid

落花浮王杯 提交于 2019-12-02 11:39:26
Can someone help me in changing the color of onclick selected text in kendo angular grids. ::selection is the property you are looking for to change the selected text color (see this answer for more details). To get this to apply to your kendo grid, use the following CSS: .k-grid ::selection { background-color: #3399FF; color: #fff; } If you are still having trouble, make sure you are applying your CSS to the global scope. Because of style encapsulation , this is the easiest way to affect the styling of a third party component such as the Kendo grid. Note: I chose this blue #3399FF with white

Convert lambda expression to Json in MVC

拜拜、爱过 提交于 2019-12-02 11:22:48
I get an error ("Cannot convert lambda expression to type 'string' because it is not a delegate type") during converting the lambda expression in controller. I have 3 entities in as below: Entities: public class Student { public int ID { get; set; } public string Course { get; set; } public int CityID { get; set; } public virtual City City { get; set; } } public class City { public int ID { get; set; } public string Name { get; set; } public int RegionID { get; set; } public virtual Region Region { get; set; } public virtual ICollection<Student> Students { get; set; } } public class Region {

Loop through multiple array and keep count of each element

自作多情 提交于 2019-12-02 11:20:51
My JSON looks something like this: [{ "Name": "Test Post", "Id": 123, "ProductHandlingTypes": [{ "Id": 1, "Name": "Type 1" }, { "Id": 2, "Name": "Type 2" }] }, { "Name": "Test Post 2", "Id": 124, "ProductHandlingTypes": [{ "Id": 3, "Name": "Type 3" }, { "Id": 1, "Name": "Type 1" }] }] So, in essence, I would like to be able to loop through all of the post's product handling types and compare them to a list of product handling types and anytime there is a match, I would like to keep track of how many times that specific type has been matched/used/found. I am currently checking for matches this

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

我是研究僧i 提交于 2019-12-02 11:20:22
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 createChart() { $("#chart").kendoChart({ theme: $(document).data("kendoSkin") || "default", dataSource: { data:

Cloning div containing kendo inputs

半世苍凉 提交于 2019-12-02 11:17:32
问题 I have an application which allows users to dynamically create divs containing kendo inputs. To do so I have a div which contains multiple kendo inputs which I use as a sort of template. When the user decides to add a section to the page, i clone my div using jquery.clone(). Everything looks fine in the UI, but since the kendo inputs only get initialized one time in HTML and are then copied, the inputs are not rebuilt therefore the initial ID is not unique and the inputs are not functional. I

Kendo datepicker shows two months during animation

狂风中的少年 提交于 2019-12-02 10:41:41
With the Kendo datepicker we are seeing two months stacked on top of each other when we transition months. Has anyone else seen this? It happens in both firefox and chrome. $(".datepicker").kendoDatePicker(); From <input type="text" id="OrderDateFrom" class="datepicker" name="OrderDateFrom" /> As soon as the transition is completed it looks normal again. UPDATE: Kendo UI Web v2013.1.319, Windows 7 OS using latest versions of Firefox, Chrome, IE 9 & 10, JQuery 1.9.1, HTML5, MVC 2. The table element created dynamically by the kendoDatePicker plugin cannot have any clear css rules applied to it.

Rendering data in kendo scheduler control header - dateHeaderTemplate

人走茶凉 提交于 2019-12-02 10:32:18
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.css" /> <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.material.min

Custom sort function kendo grid

余生颓废 提交于 2019-12-02 10:23:37
Can anyone please let me know how can we write our own function in javascript for sorting in kendo grid. And do we need to write two functions for asc and desc? Any help.. greatly appreciated! You can do it and you don't have to write two different function for ascending and descending since the only thing that you need to do is providing a compare function for the column field that you need a special algorithm. Example: Lets assume that we want to sort a grid by name (a string ) and this is our data: data : [ { id : 1, name : "john" }, { id : 2, name : "jane" }, { id : 3, name : "Jane" }, {

How to filter whole datasource on a kendo grid with virtualized remote data

倾然丶 夕夏残阳落幕 提交于 2019-12-02 10:08:31
问题 At work, we are having performances issues with a kendo grid that has a lot of row. We are thinking about using virtualization of remote data as a solution like you can see on the link below. https://demos.telerik.com/kendo-ui/grid/virtualization-remote-data The problem we have with that solution is that we allow filters on a lots of our columns and only the rows that are defined in the pagesize of the grid are displayed. In the link below, you can easily see what I mean by that. I added the

Kendo UI Window overlay opacity

有些话、适合烂在心里 提交于 2019-12-02 09:13: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 .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> You could try .k-overlay { opacity:0.9 !important; } instead. That will override the setting which kendo applies directly to the overlay. 来源: https://stackoverflow.com