knockout-kendo

Kendo grid, ko binding, and access to row index

拈花ヽ惹草 提交于 2020-01-04 04:15:12
问题 I have a ko viewmodel, which I bind to a KendoGrid, using knockout-kendo.js I use rowTemplate, because I need some custom functionality in some columns (icon, links, etc) I need to do some custom functionality based on rownumber. When binding ko viewmodel directly, I can use foreach binding and in the row template I have the $index which gives me the current row number. How can I get the same thing when the viewmodel is bound to a Kendo Grid? Thank you 回答1: Currently there is no built in

Dynamically enable/disable kendo datepicker with Knockout-Kendo.js

被刻印的时光 ゝ 提交于 2020-01-02 07:45:23
问题 I'm trying to enable / disable a kendo datepicker based on the selected value of an select using Knockout-Kendo.js. The HTML: <select data-bind="value: test"> <option value="1">1</option> <option value="2">2</option> </select> <input data-bind="kendoDatePicker: {value: date, enabled: test() == 2}" /> The JS: ko.applyBindings({ date: ko.observable(), test: ko.observable(), }); The fiddle: http://jsfiddle.net/xTjqH/2/ It does initially disable the datepicker, but it wont enable it once "2" is

Specifying default sort in grid

白昼怎懂夜的黑 提交于 2019-12-14 03:52:33
问题 Is it possible to specify a default sort when using the knockout-kendo binding to bind the Telerik Kendo grid? I am binding the grid like this: kendoGrid: { data: grid.Rows, sortable: {allowUnsort: false,mode:'single'}, columns: grid.Columns} However, I have not found a way to specify the default sort. Standard Kendo has a sort:{field:"Col1",dir:"asc"} element that can be specified on the data source, but it's unclear how this can be applied to the kendoGrid binding Default Kendo sort element

What is the difference between the data and dataSource in knockout-kendo grid widget?

我的未来我决定 提交于 2019-12-13 00:09:55
问题 So knockout-kendo has a option called data and knockout-kendo has a property called dataSource. What's the difference between the two and how do both interact with one another/change when I specify both a data and a datasource on the kendogrid of different values 回答1: As of version 0.6.2, you can pass either the actual data, dataSource config, or an existing Kendo dataSource (kendo.data.DataSource) in for the data option. In older versions, you would sometimes have to pass null for data and

Knockout-Kendo.js Grid UI:datepicker filter

老子叫甜甜 提交于 2019-12-12 04:15:01
问题 I am using the Knockout-Kendo.js integration library I am trying to get the datepicker filter working. However, whenever I add filterable: {ui: "datetimepicker" } to my configuration nothing is shown on the page and no script errors. My kendoGrid configuration looks like (here with filterable attribute on SubmittedDate) <div data-bind="kendoGrid: { data: projectSubmissions, dataSource: { schema: { model: { fields: { SubmissionId: { type: 'number' } , FormName: { type: 'string' } , IdVersion:

Unable to Customize Kendo Calendar Month templates with Knockout Kendo JS Binding

て烟熏妆下的殇ゞ 提交于 2019-12-11 20:24:27
问题 I have customized the Kendo Calendar Month Template Reference found Here with out knockout-kendo.js . Official Kendo Reference from Here. The problem is when i use the below code in knockout-kendo.js binding its not getting compiled . Take a look at this Knockout-kendo.js with Calendar at fiddle. If i remove the month view template code , its working. How do i resolve this with knockout-kendo.js? $("#calendar").kendoCalendar({ dates: birthdays, month: { // template for dates in month view

Dynamically enable/disable kendo datepicker with Knockout-Kendo.js

拜拜、爱过 提交于 2019-12-06 01:16:34
I'm trying to enable / disable a kendo datepicker based on the selected value of an select using Knockout-Kendo.js. The HTML: <select data-bind="value: test"> <option value="1">1</option> <option value="2">2</option> </select> <input data-bind="kendoDatePicker: {value: date, enabled: test() == 2}" /> The JS: ko.applyBindings({ date: ko.observable(), test: ko.observable(), }); The fiddle: http://jsfiddle.net/xTjqH/2/ It does initially disable the datepicker, but it wont enable it once "2" is selected. Based on the way that dependencies are tracked for the individual options in the kendo