kendo-ui

Can I use Kendo MVC helpers inside templates?

纵然是瞬间 提交于 2019-12-10 11:08:51
问题 I need to use Kendo MVC helper Razor code in template as listed below: <script id="some-reusable-control" type="text/x-kendo-template"> @(Html.Kendo().Window() .Name("details-window")) </script> But the problem is rendered HTML+JS contains a # (sharp symbol) that is rendered as part of #= # syntax inside template. So I getting 'parse error'. <div id="details-window" style="display:none"></div><script> jQuery(function(){jQuery("#details-window ").kendoWindow({animation:false,modal:true

MVC kendo window - Get Data from javascript function

天大地大妈咪最大 提交于 2019-12-10 11:07:29
问题 I have this kendo window in my app Html.Kendo().Window() .Name("copyStructure") .Title("Copy Structure") .Content("Loading...") .LoadContentFrom("CopyStructure", "NewXmlLayout") // <-- here* .Draggable(false) .Visible(false) .Modal(true) .Actions(s => s.Custom("")) .Events(e => e.Open("openWindow").Close("closeWindow")) And I am trying to pass data to the acrion in the LoadContentFrom() wich is returned by a javascript function, but I don't know how to do it. I can pass data like this:

Query option 'Format' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings

为君一笑 提交于 2019-12-10 11:04:02
问题 I'm getting an exception on my Web API controller end-point and I would really apricaite some help in solving this: Here is the story: My Web API project a controller exposes the following End-Point: My Kendo UI Datagrid makes the following request: http://localhost:63865/api/employees/GetAll?$callback=jQuery21109420544053427875_1410883352953&%24inlinecount=allpages&%24format=json&%24top=5 When validating the ODataQueryOptions sent in the request, I'm getting this exception: Query option

kendo uploader Cross domain issue in Web.Api

混江龙づ霸主 提交于 2019-12-10 10:38:00
问题 i already enable the Cors in my WEB API project ! all other methods inside the API controller can access from the other project ! but kendo uploader request can not reach to the controller method $("#files").kendoUpload({ async: { xhrFields: { withCredentials: true }, saveUrl: 'http://localhost:23618/API/test/UploadAttachment', removeUrl: 'http://localhost:23618/API/test/RemoveAttachment', autoUpload: true }, upload: function (e) { e.data = { contactID: 5 }; }, error: onError }); error A

Knockout-Kendo dropdownlist Ajax observableArray get selected item name

北慕城南 提交于 2019-12-10 10:26:57
问题 My application is MVC 5, I use the following Knockout-kendo dropdown list: <input data-bind="kendoDropDownList: { dataTextField: 'name', dataValueField: 'id', data: foodgroups, value: foodgroup }" /> var ViewModel = function () { var self = this; this.foodgroups = ko.observableArray([ { id: "1", name: "apple" }, { id: "2", name: "orange" }, { id: "3", name: "banana" } ]); var foodgroup = { name: self.name, id: self.id }; this.foodgroup = ko.observable(); ko.bindingHandlers.kendoDropDownList

How to add DatePicker in ClientTemplate for Kendo MVC Grid

≯℡__Kan透↙ 提交于 2019-12-10 10:14:09
问题 I am trying to port my code from syncfusion to telerik kendo MVC UI, I need to show Datepicker in Grid cell, and for which I have done in grid column as: columns.Add("TemplateCol").Title("Out of date").TemplateColumn(true).TemplateName("TemplateOutOfDate"); and for TemplateOutOfDate I have made in seperate .cshtml file as @Html.Syncfusion().DatePicker("OutOfDate" + Model.ID.ToString(), Model.OutOfDate).DefaultDate(Model.OutOfDate).DisplayDefaultDateOnLoad(true).DateFormat(Model

kendo UI grid update function wont fire

孤人 提交于 2019-12-10 10:13:08
问题 $('#usersGrid').kendoGrid({ columns: [ { field: "UserName", title: "Display name", width: "140px" }, { field: "Unit", title: "Unit", width: "140px" }, { field: "Email", title: "E-mail", width: "140px" }, { field: "Indienst", title: "Indienst", width: "140px" }, { field: "Uitdienst", title: "Uitdienst", width: "140px" }, { field: "Roles", title: "Roles" }, { command: { text: "edit", click: openEdit } } ], editable: { update: true, create: true }, dataSource: { transport: { read: function

Kendoui Grid Get Selected Row Id when Edit Button is clicked

本秂侑毒 提交于 2019-12-10 08:59:02
问题 I have a simple grid and I'm having a lot of trouble collecting the PersonID when the edit button is clicked using JQuery. I need the PersonID because I'm going to add a file upload to the inline edit column and i want to upload a file and associate it with the PersonID. All help welcome :) @(Html.Kendo().Grid<GridCustomPopupTemplate.Models.Person>().Name("Grid") .DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(m => m.PersonID)) .Read(read => read.Action("GetPersons",

MVVM binding for cascading DropDownList

我的梦境 提交于 2019-12-10 05:32:14
问题 I have a web page with two kendoDropDownList using cascading. The first are States and the second Cities . When you choose a State then you are able the City to choose from the second DropDownList . This works perfectly well if I pick them using the mouse. The problem is when I try to bind some data to these DropDownLists where the State is updated but not the City . This is the HTML of my page: <div id="container"> <input id="state" name="state" data-bind="value: state"/> <input id="city"

How to prevent Kendo UI Grid from rebinding many times when updating ViewModels

扶醉桌前 提交于 2019-12-10 03:54:31
问题 When you bind to a Kendo UI Grid with MVVM, databound will fire once and all is well. If you need to update that data after the fact, every time you change one piece of data on any viewmodel (or child viewmodel), the entire grid re-databinds. Thus, if you had some cell in the grid that is bound to a template and you have to change 2 or 3 properties on the viewmodel from some external ajax source, Databound will fire 2 or 3 times for each model that is changed, causing the entire viewable area