kendo-ui

Convert TimeSpan.TotalMilliseconds to datetime and format it as hour:minute

孤街浪徒 提交于 2019-12-12 05:30:02
问题 I kinda confuse about the date time conversion in my model i have defined public DateTime? Sent { get; set; } public DateTime? Reply { get; set; } public double ResponseTime { get; set; } in linq part i am using ResponseTime = (u.Reply - u.sent).TotalMilliseconds which is not formated and displayed like this 979809803 I want to know how do i convert it to datetime format, and eventually will display the format as hour:minute, for instance 2:45 between the date sent and date reply. 回答1:

How can I have kendo NumericTextBox keep focus during highlighting in a kendo window?

大城市里の小女人 提交于 2019-12-12 05:16:17
问题 I have a kendo window that contains a kendo numeric text box: $('input').kendoNumericTextBox({ decimals: 2, spinners: false }); $('#win').kendoWindow({ modal: true, width: "969px", height: "646px", title: "NumericTextBoxTest" }); $('#win').data('kendoWindow').center().open(); The jsfiddle is here http://jsfiddle.net/e6shF/40/. In Firefox, you are unable to highlight the numeric text box value. In Chrome, you can highlight the value but can't type over the value while it is highlighted. It

hide and show columns- kendo grid

大兔子大兔子 提交于 2019-12-12 04:56:57
问题 How to hide and show columns of kendo grid without using jquery? here is the js fiddle link for the example: http://jsfiddle.net/tmLmk/7/ HTML code: <div ng-controller="GridController"> <div kendo-grid k-options="options" k-data-source="sData"></div> </div> JS code: angular.module('angular-kendo-example', ['kendo.directives']); function GridController($scope) { $scope.options = { sortable: true, pageable: true, columns: [{ field: "column1", title: "column 1", width: "40px" },{ field: "column2

breezejs: Nonscalar navigation properties are readonly

我的未来我决定 提交于 2019-12-12 04:35:42
问题 I have the following metadata: var entityTypeParent = { shortName: 'ParentItemType', namespace: 'MyNamespace', autoGeneratedKeyType: Identity, defaultResourceName: 'ParentItemTypes', dataProperties: { id: { dataType: DT.Int32, isPartOfKey: true } }, navigationProperties: { users: { entityTypeName: 'User', isScalar: false, associationName: 'ParentItem_User' } } }; var entityTypeUser = { shortName: 'User', namespace: 'MyNamespace', autoGeneratedKeyType: Identity, defaultResourceName: 'Users',

how can I use same data source for Kendo chart and kendo multi select?

谁说胖子不能爱 提交于 2019-12-12 04:34:31
问题 I am using kendo angular chart and multiselect. Right now I am call same api twice to load the data in both. Is there any way to define multiple schema in same api call? My data is like following { "List": [ { "Name": "xyz", "Activation": "2016-12-08", "End": "2016-12-09", "Run": "45", "Status": "FAILURE", "color": "red" }, { "Name": "wqe", "Activation": "2016-12-07", "End": "2016-12-08", "Run": "46", "Status": "FAILURE", "color": "red" } ], "NameList": [ { "Name": "joo" }, { "Name": "foo" },

Avoid Auto Open When clicking in Kendo Multi Select

巧了我就是萌 提交于 2019-12-12 04:34:26
问题 How to disable auto open when clicking the kendo multiselect auto complete box.It may be open when i start typing. 回答1: You should intercept open event, check for length of typed text and if it is 0 then invoke preventDefault . Something like: $("#required").kendoMultiSelect({ open : function (e) { var len = this.input.val().length; if (len == 0) { e.preventDefault(); } } }) <link href="http://cdn.kendostatic.com/2014.2.1008/styles/kendo.common.min.css" rel="stylesheet" /> <link href="http:/

Cancel file upload on server when cancelled from client

烂漫一生 提交于 2019-12-12 04:25:32
问题 I am using kendo file upload control in my application. I select a file of 20 MB size for example. The request goes to the server which needs to upload this document to azure + insert a DB entry pointing to the blob. Issue is, if the server has all the bytes transferred to itself and the rest of the operations takes sometime (like uploading the file and inserting an entry to DB) and at the same time, user cancels upload from client, it gets cancelled on the client end BUT server still goes

Kendo dropdown binding

 ̄綄美尐妖づ 提交于 2019-12-12 04:24:01
问题 I have this enum: public enum PayTerms { [Display(Name = "30")] _30 = 1, [Display(Name = "60")] _60, [Display(Name = "90")] _90, [Display(Name = "120")] _120, CAD } Using this template I manage to create dropdown list with proper names: @model PayTerms? <div class="k-edit-label">@Html.LabelFor(x => x)</div> <div class="k-edit-field"> @(Html.Kendo().DropDownListFor(m => m) .BindTo(EnumHelper.GetSelectList(typeof(PayTerms))) .OptionLabel("-- Select --")) </div> But I have problems with binding.

Kendo UI Treeview - Binding with Hierarchical data

落爺英雄遲暮 提交于 2019-12-12 04:19:34
问题 Sorry for asking basic question, I am using Kendo UI first time. My question is: I have hierarchical data returned from SQL Server Common Type Expression (CTE) in below format Id ParentId Name 1 0 Name-1 (Level 0) 2 0 Name-2 (Level 0) 3 1 Name-3 (Level 1) 4 3 Name-4 (Level 2) and so on... I need to bind this data to Kendo UI Tree View control. All the samples I saw in Kendo UI docs deals with hard coded data and then there is HierachicalDataSoruce examples but in those examples hierarchical

Telerik Kendo MVC Grid - How do I set onload/initial filter equals True with checkbox columns?

爷,独闯天下 提交于 2019-12-12 04:19:06
问题 I've been charged with changing my company's current webforms site pages to MVC. We use the Telerik tools package and I am looking for a way to set an initial filter on my grid so that when the page is loaded the grid defaults to showing only records that are checked (true). I have found several questions similar to this but so far none of the answers I have found in those instances dealt with checkboxes. The code below is my "Active?" = True/False column in the MVC grid. I'm checking the