kendo-ui

How can i disable kendo editor in asp.net mvc

蓝咒 提交于 2020-01-03 15:34:32
问题 How can I disable kendo editor or make it read only? I tried using HTML attribute but no luck ( or I still do it right) @(Html.Kendo().Editor() .Name("Text") .Value(@detail.SRoomInformation) .Tools(tools => tools.Clear()) ) 回答1: If you are wondering why there is no such option such as Enable/Disable - because html could be simply shown as html or as text - all the tools the Editor provide are not needed and it is pointless to use such widget. Editor means it helps you edit ;) If you really

how to Change Caption of popup kendo grid by html helper in add window

妖精的绣舞 提交于 2020-01-03 11:45:27
问题 I am using the popup kendo grid and i use add new record and edit mode and i want change caption of popup window kendo grid by html helper when i add new record. <div class="k-rtl"> @(Html.Kendo().Grid<KendoSample.Models.Person>() .Name("grid") .Columns(columns => { columns.Bound(p => p.PersonId).Title("Person Code").Width(100).Sortable(true); columns.Bound(p => p.Name).Title("Name").Width(200).Sortable(true); columns.Bound(p => p.Family).Title("Family").Sortable(false); columns.Command(c =>

Kendo DataSource: How to set filters before fetch without sending two httprequests

本秂侑毒 提交于 2020-01-03 07:23:21
问题 Environment: kendo version: 2013.1.319 dataSource: productsDataSource = new kendo.data.DataSource({ type: "odata", transport: { read: "http://www.mydomain.com/odata.svc/products", dataType: "json", contentType: "application/json" } schema: { type: "json", data: function(data){ return data.value; }, total: function(data){ return data['odata.count']; }, model: product }, pageSize: 50, serverPaging: true, serverFiltering: true, serverSorting: true }); Get data: productsDataSource.filter([{ field

How to set list as kendo grid datasource in javascript?

Deadly 提交于 2020-01-03 05:42:08
问题 I have a modelview list and want to set this list as kendo grid datasource in a kendo window . Ajax $.ajax({ url: '@Url.Action("KatildigiKurslar", "Tanim")', type: 'POST', dataType: "json", data: { kursiyerId: kursiyerId}, success: function (result) { var kurslar =result.kurslar; //----------I've tried like this but not working ----------------// var dataSource = new kendo.data.DataSource({ data:kurslar }); $('#GridKatildigiKurslar').data("kendoGrid").setDataSource(kurslar); $("

Kendo UI validator fails in grid (message doesn't dissapear)

旧时模样 提交于 2020-01-03 04:34:33
问题 I have to validate some data in kendoUI grid widget. Seems there is a bug in validator component. Steps to reproduce: 0. Open and run http://jsfiddle.net/Upw9j/2/ here's the code (some part is missing here due to SO limitations): $(document).ready(function () { var crudServiceBaseUrl = "http://demos.telerik.com/kendo-ui/service", dataSource = new kendo.data.DataSource({ transport: { read: { url: crudServiceBaseUrl + "/Products", dataType: "jsonp" }, update: { url: crudServiceBaseUrl + "

Pass Javascript/html Variable as Parameter with Kendo MVC upload control

前提是你 提交于 2020-01-03 04:33:09
问题 Have a requirement to pass additional parameter with value of parameter set from javaScript or HTML field. Example in below case how I can pass HTML element value or Javascript variable value to uploadID . Note: Have limitation to use ViewModel in this place. @(Html.Kendo().Upload() .Name("files") .Async(a => a .Save("Save", "Upload", new { uploadID = "XXX" }) .Remove("Remove", "Upload") .AutoUpload(true) ) ) 回答1: Try this out: @(Html.Kendo().Upload() .Name("files") .Async(a => a .Save("Save"

Adding items to a Kendo multiSelect

为君一笑 提交于 2020-01-03 02:04:40
问题 I've got a Kendo Grid and on its DataBound event, I want to add its data source to a Kendo MultiSelect. So, when the data from the grid is loaded, the below function is fired. Here's what I have tried so far, without success, but from the code you can see what I intend: function addToMultiSelect() { var multiSelect = $("#multiSelect").data("kendoMultiSelect"); var grid = $("#grid").data("kendoGrid"); var places = grid.dataSource._data; for (var i = 0; i < places.length; i++) { var row =

Adding items to a Kendo multiSelect

家住魔仙堡 提交于 2020-01-03 02:04:21
问题 I've got a Kendo Grid and on its DataBound event, I want to add its data source to a Kendo MultiSelect. So, when the data from the grid is loaded, the below function is fired. Here's what I have tried so far, without success, but from the code you can see what I intend: function addToMultiSelect() { var multiSelect = $("#multiSelect").data("kendoMultiSelect"); var grid = $("#grid").data("kendoGrid"); var places = grid.dataSource._data; for (var i = 0; i < places.length; i++) { var row =

KendoUI datasource group and aggregate by multiple fields

点点圈 提交于 2020-01-02 22:04:15
问题 I'm trying to group a datasource by two fields and get the average or sum of their values. But even if I specify both group and aggregate properties in the datasource, I can't get it. Here is the code: var dataSource = new kendo.data.DataSource({ data: [ { id: 1, name: "Amazon US", stock: 15, year: 2015}, {id: 2,name: "Amazon US", stock: 20, year: 2016 }, {id: 3,name: "Amazon US", stock: 7, year: 2016 }, { id: 4, name: "Amazon EU", stock: 30, year: 2015 }, { id: 5, name: "Amazon EU", stock: 7

jquery returns an error after i make changes to Kendo UI Grid Data

帅比萌擦擦* 提交于 2020-01-02 22:01:30
问题 I have a Kendo Grid that I use to return a Grid that has check boxes in each rows. The purpose of those check boxes is to add the Balance amount of each row that has a checked check box and process the total Balance amount after I press a button. Here is how I do it: function getData() { return [ { accountNumber: "28495", transactionNumber: "2440", TransType: "INV", TransReferenceNumber: "11867115", transactionDate: "6/18/2013", transactionDebitAmount: "1920.20", openBalance: "1920.20",