kendo-ui

kendo grid cancel edit on nested datasource

江枫思渺然 提交于 2019-12-11 14:27:53
问题 I have viewmodel with nested json datasource. Here is my DEMO (use second contact "personal contact" for testing) [{ person_id:1, person_name:"John", contact: [ {email:"john@domain.com"} ] }] I am binding videmodel to grid with contacts detail template: + person => contact 1 => contact 2 Grid is editable using custom popup editor template, where I can edit person and contacts all in one form. Available personal contacts are presented using listview with form above it (click on the row binds

Using a kendo observable property in multiple viewModels

旧街凉风 提交于 2019-12-11 14:27:42
问题 In a Kendo app using the Kendo MVVM framework: I have a "global" viewModel which is information that is common to all parts of the app - e.g. the UserState, which has a property isLoggedIn. Many different Views and ViewModels access the userState object (from what I can see, 1 View is bound to 1 ViewModel in Kendo). For example, my home page might show the Login button if they are not authenticated. Then all the other screens behave differently once you are logged in, so each ViewModel needs

Kendo - Grid - Custom Aggregate in FooterTemplate

送分小仙女□ 提交于 2019-12-11 14:26:57
问题 My understanding is that Kendo does not support custom aggregates but you can call a function in the footerTemplate. That function then can provide calculations on the data and can even reference kendo defined aggregates. So, for example, footerTemplate: "<div><b>Range</b> #= computeRange()#</div>" If this is correct, how would you write the function computeRange? It would use max-min aggregates. Also, how would you write a computeMedian function? Thanks in advance for your help. 回答1:

Kendo Angular Upload Adds to Start of Text File?

◇◆丶佛笑我妖孽 提交于 2019-12-11 14:06:13
问题 I'm using the Kendo Upload control in an Angular app and it's 99% working, but it seems to be adding a small piece of text to the start of the text file I'm uploading. Here is the HTML definition: <kendo-upload [saveUrl]="SaveUrl" (upload)="UploadHandle($event)" (error)="UploadError($event)" [restrictions]="Restrictions" (success)="UploadSuccess($event)"></kendo-upload> The upload handler: UploadHandle(e: UploadEvent): void { e.data = { type: 'MasterFile' }; } The restrictions and save URL

group filed kendo grid with type object

。_饼干妹妹 提交于 2019-12-11 13:48:59
问题 I have similar example to this grid http://jsfiddle.net/Sbb5Z/478/ I want to apply grouping on category field. I got an error. because category filed type is object. How can I specify the grouping filter field. I tried this but it did not work groupable: { field:"Category.CategoryName", } Any ideas ?? 来源: https://stackoverflow.com/questions/17547302/group-filed-kendo-grid-with-type-object

Kendo UI - Datagrid, how to add additional params to request?

♀尐吖头ヾ 提交于 2019-12-11 13:34:15
问题 I have editable datagrid. I would like to change read transport to POST and add some additional data to json request (for example access_token). Example below produce GET request instead of the POST and without additional data. Question is: How can i do that? dataSource = new kendo.data.DataSource({ transport: { read: { type: "POST", url: crudServiceBaseUrl + "/Products", contentType: "application/json; charset=utf-8", dataType: "jsonp", data: { "my_param": 1} }, update: { type: "PUT", url:

Working on templates for columns in kendo grid

梦想的初衷 提交于 2019-12-11 13:30:06
问题 I have been trying to use if and else in a template of one of the field in kendoGrid.I have two fields "StatusDesc" and "newStatusDesc". I want show one of the value as an anchor tag. That is displaying fine but if you notice onclick defined for anchor tag,it has one of the field from the grid itself because it has to open a another page but when i click on the anchor tag, console of my browser shows: uncaught ReferenceError: WEW6101 is not defined Actually if I check firebug, it shows below

Why are my KendoGrid “update” parameters always null in the controller?

坚强是说给别人听的谎言 提交于 2019-12-11 13:01:50
问题 I have the following code in my Index.cshtml file: var dataSource = new kendo.data.DataSource({ type: "json", transport: { read: { url: '@Url.Action("ReadTeachers", "EducationPortal")', dataType: "json" }, update: { url: '@Url.Action("UpdateTeachers", "EducationPortal")', type: "POST" }, parameterMap: function (data, operation) { if (operation != "read"){ var result = {}; for (var i = 0; i < data.models.length; i++) { var teacher = data.models[i]; for (var member in teacher) { result["teacher

Hide the validation error?

旧城冷巷雨未停 提交于 2019-12-11 12:48:40
问题 Here issue is validation is working fine for datetimepickers but while click reset button valaidation is must hide how to do? fiddle:http://jsbin.com/ufimom/167/edit code $("#clear").click(function(){ $("#datetimepicker").find("span.k-tooltip").hide(); $("#datetimepicker1").find("span.k-tooltip").hide(); }); 回答1: Sandeep, Try this.. $("#clear").click(function(){ $("#datetimepicker").siblings("span.k-tooltip-validation").hide(); $("#datetimepicker1").siblings("span.k-tooltip-validation").hide(

How do you set the data function for a Kendo DataSource using the Razor HTML Helpers?

北城以北 提交于 2019-12-11 12:41:21
问题 I'm trying to get the Kendo UI for ASP.NET MVC grid control working with a WebApi controller using OData queries. I would prefer to emit the relevant javascript using the Html helpers but I'm struggling to emit the equivalent of this: schema: { data: function (data) { return data; } } I've tried this: .Schema(schema => schema.Data((object data) => { return data; })) But I'm getting Error: 'Kendo' is undefined in IE and the actual JS emitted is: "schema":{"data":Kendo.Mvc