kendo-ui

Kendo UI - Difference between observable, ObservableObject and Model

血红的双手。 提交于 2019-12-05 09:07:27
What are the differences between the observable, ObservableObject and Model? Thank You. Model inherits from ObservableObject which inherits from Observable. Observable provides support for events - the bind, unbind and trigger methods. ObservableObject provides change tracking. Used by the DataSource and the MVVM framework. Model provides identity (via the id field) and field definition. Used by the DataSource when schema.model is set. 来源: https://stackoverflow.com/questions/20246885/kendo-ui-difference-between-observable-observableobject-and-model

Kendo Grid filter to use combo box with column.values rather than drop down list

强颜欢笑 提交于 2019-12-05 08:41:51
I'm trying to get Kendo's Grid to show a filter using a combo box rather than a drop down list when used with values. What I mean is, on the grid columns array, each column can be given a list of values (objects with text and value properties) for each possible entry in the database, thereby rather than showing a code, it shows a recognisable name or text instead of the code. The problem is that whenever I specify values against the column, the filter reverts to a fixed list of criteria and a drop-down list, which I don't want. See an example of what I mean here . What I'd like to see is the

Kendo-Knockout: How to center window

妖精的绣舞 提交于 2019-12-05 08:38:49
I am using RPNiemeyer`s kendo-knockout library. I have a kendo window which I use like this in the html: <div data-bind="kendoWindow: { isOpen: isOpen, title:'States', width: 600, height: 150, modal: true, resizable: false, actions: ['Maximize', 'Close'] }" > </div> I used to center the dialog like this: $('#productionStates').data("kendoWindow").center(); But as center is a method I cannot pass it in the markup like this center: true . In the kendo-knockout documentation there is a property widget for some of the widgets and my guess is that this is the key but I am not sure how to use it as

MVVM binding for cascading DropDownList

泪湿孤枕 提交于 2019-12-05 08:28:16
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" name="city" data-bind="value: city"/> </div> And this is the JavaScript: var state = $("#state")

how to get the reference for checkbox element from both parent and child grids

左心房为你撑大大i 提交于 2019-12-05 08:17:06
I have got requirement like i need to find the parent grid row checkbox and if parent grid row checkbox is checked then i need to set all child grid checkboxes to true for that parent grid row checkbox for that purpose I have done like this.... <script type="text/javascript"> $(document).ready(function () { $('#btnMove').click(function () { var parentgrid = $('#GridParent').data('kendoGrid'); var childGrid = $('#GridParent').closest(".k-grid").data("kendoGrid"); var Count = $('#Gridparent').data("kendoGrid").dataSource.total(); alert(Count); for (i = 0; i < Count; i++) { var isChecked =

Give kendo datasource an angular scope variable

喜你入骨 提交于 2019-12-05 08:14:06
I'm currently trying to fill a kendo grid with remote data. Kendo has its own function to fetch the data, but I want to use the angular factory which I created. So I have a factory, which has a function "getSkills". This function obtains all the skill objects from my api. angular.module('MyApp').factory('Factory', function ($resource) { return $resource('/api/v1/skills/', { }, { getSkills: { method: 'GET', isArray: true } }); }); In my SkillController in angular, I put these fetched skills in a scope variable. $scope.skills = SkillFactory.getSkills(); I initialize the Kendo grid here: $scope

Kendo UI treeview parent node without checkbox

喜欢而已 提交于 2019-12-05 08:11:14
What approach will be to achieve displaying TreeView with checkboxs but I do not need checkbox for parents node only for "items" without children. i.e. I am displaying folder structure but do not want to have checkbox for any folder only for files. Thanks. You should use use checkbox template . If there are not children do not display checkbox input at all. Here is a JSBIN example what I am talking about. 来源: https://stackoverflow.com/questions/13847237/kendo-ui-treeview-parent-node-without-checkbox

How to retrieve all data of a kendo ui dropdown list?

爱⌒轻易说出口 提交于 2019-12-05 07:48:49
I want to pull all data of a kendo dropdown list. I create dropdown with this code: $("#dropDownList").kendoDropDownList({ dataTextField: "field", autoBind: true, dataSource: { transport: { type: "POST", read: { url: "http://abc.com", contentType: "application/json; charset=utf-8", dataType: "json" } } }, select: onSelect }); }; Then I tried to pull data with using var data = $("#dropDownList").data("kendoDropDownList").val(); var values = []; for (var item in data) { values.push(this.item); } But it didn't work. Any idea how can I do? Thanks in advance. Can you try : var data = $("

Post Kendo Grid data to Controller in MVC

痞子三分冷 提交于 2019-12-05 07:47:06
I have two classes. One that contains a list of the other class: public string Name { get; set; } public string Surname { get; set; } public int Age { get; set; } public List<Models.Occupation> Occupations { get; set; } The second class is as follows public string Name { get; set; } public string Industry { get; set; } My controller rendering the view Person p = new Person() { Name = "megan", Surname = "du Preez", Id = 0, Age = 22 }; return View(p); In the view @model Models.Person <form id="person"> <div> @Html.TextBoxFor(mp => mp.Name) @Html.TextBoxFor(mp => mp.Surname) @(Html.Kendo().Grid

kendo ui grid filter, sort and paging in the server

被刻印的时光 ゝ 提交于 2019-12-05 07:29:37
I'm using kendo grid and want to perform filtering, sorting and paging in the server. I understand that I should add to the dataSource: serverPaging: true, serverSorting: true But how do I tell the grid/dataSource which url it should use for the sortig, filtering etc. And what if I want to perform the sortig myself? I want to use the control kendo provides but to go to the server myself. Is there an event like "sortTriggered" where I can call "prevntDefault" or something like that... I don't know. Take a look at this sample. It is using the MobileServices javascript api for Windows Azure, but