kendo-ui

Kendo grid - adding column from nested dictionary

混江龙づ霸主 提交于 2019-12-13 18:05:41
问题 [Serializable] public class ContactDto { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string CompanyName { get; set; } public Dictionary<string, string> CustomFields { get; set; } } I have the contactdto class above with a dictionary of customfields. Those can be anything 'MotherName' 'Birthdate' etc. How do i display the custom fields as columns in the kendo grid? All the contactDTO's will have the same dictionary keys. I am

Kendo MVC: Adding Edit, Delete Buttons to Grid

懵懂的女人 提交于 2019-12-13 16:29:29
问题 Assuming I have the below table: @Html.Kendo().Grid(Model).Name("Staff").Columns(x => { x.Bound(y => y.StaffId); x.Bound(y => y.FirstName); x.Bound(y => y.LastName); x.Bound(y => y.Email); x.Bound(y => y.Phone); x.Command(y => y.Custom("Edit").Action("edit", "controller", new { id = ????? })); }).Sortable().Scrollable().Pageable(x=> x.PageSizes(true)).Filterable() How can I pass the primary key value (StaffId in this case) associated to the row to the object route values similar to the way it

Kendo dropdown rebind using jquery

你。 提交于 2019-12-13 16:15:49
问题 I am trying to bind a list of SelectList Items to a Kendo dropdown in jquery using dropDown.setDataSource(result) event. But the issue is, the data displayed in the drop-down is showing as [object object] . $(document).ajaxStop(function () { var exportTypeDropDown = $("#exportTypeDropDown").data("kendoDropDownList"); if (dropDownLoaded == false && exportTypeDropDown!=null) { dropDownLoaded = true; var url = "@Url.Action("GetExportTypes", UiControls.ControllerName)"; $.ajax({ url: url, type:

Interceptor for Authorization headers using Kendo UI datasource

a 夏天 提交于 2019-12-13 13:27:12
问题 I am using webapi and restrict web api's to authenticate by token, so to populate datasource I use request headers in DataSource. var abcDatasource = new kendo.data.DataSource({ transport: { read: { url: '/api/exampledata', dataType: 'json', headers: { 'Authorization': 'Bearer ' + accesstoken } }, }, pageSize: 5, }); the below line of code need to repeat at all datasource headers: { 'Authorization': 'Bearer ' + accesstoken } Is it possible to make central function which overwrite the kendo

Does document.execCommand('copy') have a size limitation?

只谈情不闲聊 提交于 2019-12-13 13:05:05
问题 I am using document.execCommand('copy') similar to what is described here: https://developers.google.com/web/updates/2015/04/cut-and-copy-commands In my case, I'm placing data from a Kendo grid into a hidden textarea to be copied. Somewhere between 2500 and 3000 rows, or around 350k of data, the copy fails. I've unhidden the textarea to make sure it's getting the full contents of the grid, and that is working. I can copy all 3000+ rows manually from the visible textarea. But document

Kendo Multiselect: Selected values from binded model are not initialized

℡╲_俬逩灬. 提交于 2019-12-13 13:04:39
问题 Update: To shorten the question: How to bind a SelectList to a Kendo UI MultiSelect Widget using Razor? Original question: In an ASP.NET MVC 4 Application, I am trying to get the Kendo Multiselect working. I am binding the Multiselect widget to my model/viewmodel but the init values are not being used. Selecting and so works perfectly. Model: public class Data { public IEnumerable<int> SelectedStudents{ get; set; } } public class Student { public int Id { get; set; } public string Name { get;

Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed

核能气质少年 提交于 2019-12-13 12:56:27
问题 Hello I am getting the error: Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed. Using a Kendo UI tabstrip and MultiSelectBoxes with a Razor View and MVC4 I have tried implementing the helper class, but I am still getting the error Here is my code, am I missing a step? I moved the 3 multiselects out and called them with the helper! @(Html.Kendo().TabStrip() .Name("tabstrip") .Items(tabstrip => { tabstrip.Add().Text("One") .Content(@<div>

Kendo UI Grid Data variable Vue.js

我们两清 提交于 2019-12-13 09:34:38
问题 In the kendo UI it is possible to load the grid with data from a variable in the Vue.js? 回答1: Yes, instead of using a data-source-ref, you can bind to a data-source property. This can be an instance of an kendo DataSource or a simple array. For example, here's the default demo, changed to bind to an array of objects. var products = [{ "ProductID": 1, "ProductName": "Chai", "UnitPrice": 18, "UnitsInStock": 39, "Discontinued": false }, { "ProductID": 2, "ProductName": "Chang", "UnitPrice": 19,

Required Field Validation only when field is visible in asp.net mvc

萝らか妹 提交于 2019-12-13 09:34:21
问题 I have a checkbox where you can hide/show a datepicker field. But when the datepicker field is hidden there has to be no validation. This is the checkbox: @Html.CheckBox("showEindDatum", (Request.Form["showEindDatum"] ?? string.Empty).Contains("true")) And this is the datepicker: @FormGroupHelper.CreateFormGroup(Html, m => m.EindDatum, Html.Kendo().DatePickerFor(m => m.EindDatum).Min(Model.EindDatum.HasValue ? Model.EindDatum.Value : DateTime.Today).Format("dd-MM-yyyy").ParseFormats(new

Produce another pop up based on selected dropdown

若如初见. 提交于 2019-12-13 09:04:31
问题 I am using Kendo UI pop up(template). I have dropdown here. In my demo, I already have the pop up 1. So, right now I want to make if test1 selected, should be other for popup for test1. Other than that, do not happen anything. Is it possible to do that? I'm really need help here. Thank you, please see my demo below. My demo here using jsfiddle : http://jsfiddle.net/ak6hsdo8/2/ HTML <div id="grid"></div> <!-- Kendo popup template --> <script type="text/x-kendo-template" id="popup_editor"> <p