kendo-ui

Kendo UI grid filters not working inside a bootstrap Modal

醉酒当歌 提交于 2019-12-07 02:01:23
问题 I got this strange issue on Kendo UI grid. I have a grid which is filterable, but it is inside the modal. But the problem is when i Filter a column (Text column) i cannot type on the filter textbox. It is weird because in all browser it doesnt work. Here is my Example repro Jsfiddle Demo Here <div class="container"> <h3>Modal Example</h3> <div> <a href="#myModal1" role="button" class="btn" data-toggle="modal">Launch Modal</a> </div> <!-- Modal --> <div id="myModal1" class="modal hide"

Set the format of a Kendo DateTimePicker date sent to the controller

半城伤御伤魂 提交于 2019-12-07 01:59:30
问题 I'm using a Kendo DateTimePicker in my application. The value I get from it in my application is Wed Aug 13 2014 00:00:00 GMT+0200 (Romance Daylight Time) I can't parse this to a DateTime. I get a "String was not recognized as a valid DateTime." error. How can I set the format of the date I get from the DateTimePicker?? Is there an option in Kendo DateTimePicker??t 回答1: If you Need to Change the Date that you get from your application you can do as below var dateobj=kendo.parseDate("Wed Aug

Kendo UI Angular JS and AutoComplete with a service

为君一笑 提交于 2019-12-07 01:53:14
问题 I'm making an Angular App and I'm starting to use some of the Kendo UI controls. I'm having some issues wiring up the AutoComplete control. I would like to use a factory that will return the list of "auto complete" values from my database. I have iincluded the auto complete control and I'm trying to use the k-options attribute: <input kendo-auto-complete ng-model="myFruit" k-options="FruitAutoComplete" /> In my controller the following hard coded list of fruits work: $scope.FruitAutoComplete

Kendo ListView: cant refresh (reload) data

安稳与你 提交于 2019-12-07 01:32:46
问题 Here is my ListView: @(Html.Kendo().ListView<Entity>() .Name("listView") .TagName("div") .ClientTemplateId("template") .DataSource(dataSource => { dataSource.Read(read => read.Action("Products_Read", "Home").Data("additionalData")); dataSource.PageSize(4); }) .Pageable() ) Here are javascript function that must reload data: var someData = "-1"; function reload() { // insure that function exists // alert( $("#listView").data("kendoListView").refresh) $("#listView").data("kendoListView")

How to sort numeric with string values in Kendo-Grid

南楼画角 提交于 2019-12-07 00:11:59
问题 I am using Kendo-Grid which is having a column has values of both number & string (NA). Any idea how to sort them? 回答1: You can sort them using a custom compare function. Here is some sample code which will put items with 'N/A' on top: $("#grid").kendoGrid({ dataSource: [ { price: 1 }, { price: "N/A" }, { price: 20 }, { price: 2 } ], sortable: true, columns: [ { field: "price", sortable: { compare: function(a, b) { var x = a.price; var y = b.price; if (x == 'N/A') { x = 0; } if (y == 'N/A') {

KendoUI datasource group and aggregate by multiple fields

孤街醉人 提交于 2019-12-06 23:13:23
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, year: 2015 }, { id: 6, name: "Amazon EU", stock: 12, year: 2016 }, { id: 7, name: "Amazon EU", stock:

Kendo Grid in Bootstrap 2 or 3 Modal - IE Filters do not work

若如初见. 提交于 2019-12-06 16:28:55
Please check this out in IE (boot v2): http://jsbin.com/emuqazEz/22 Here is bootstrap 3 version: http://jsbin.com/emuqazEz/31 Here is the editable version: http://jsbin.com/emuqazEz/22/edit The filters do not work at all in any version of IE I have tested. It works fine however in Chrome or Firefox. Here is are the column settings and the datasource: columnsettings = [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "130px" }, { field: "UnitsInStock", title: "Units In Stock", width: "130px" }, { field: "Discontinued", width: "130px" } ]; var gridDataSource =

How to compare and display kendo dirty flag upon editing only if the old value and new value are different before saving the grid

妖精的绣舞 提交于 2019-12-06 16:18:07
问题 In a kendo grid, in grid cell when I change a value kendo's dirty flag is displayed. But then when I click back to the same grid cell and change it to the previous value (already existing value) the dirty flag still appears. How can I check whether the value is similar to the previous value and not display the dirty flag before saving. Below is my code for kendo editable dropdown. function editCategoryDropDown(container, options) { var catObject = JSON.parse(ticketProjectCategoryObject.value)

kendo ui mvc grid editortemplate issue

我的梦境 提交于 2019-12-06 16:09:18
问题 What I am trying to do : I have a form with Kendo UI controls like DatePicker(s), Dropdownlist(s), NumericTextBox(s) on the first half of the page Second half has a Kendo UI MVC Grid control This Kendo UI Grid control has 8 columns in which 2 columns has a Kendo dropdownlist(EditorTemplate) and CheckBox(EditorTemplate). The Kendo UI Grid control is Ajax binding. When the save button is clicked, all the values from the Kendo UI controls(first half) and Kendo UI grid control(second half)

Create another toolbar in kendo grid

旧时模样 提交于 2019-12-06 16:06:39
I am using Kendo library for grid. I want to have a toolbar in that grid. I have followed this link - http://demos.kendoui.com/web/grid/toolbar-template.html and created a toolbar at the top I also want to add another toolbar at the bottom of grid. Below or above pagination bar. I could not find any way to create this extra toolbar. Please help. There are two ways of getting it: You let Kendo UI generate in the top and then you move it to the bottom You generate it to the bottom. The first approach is fast and if you don't need header toolbar is the best. Just add the following code: $("#grid)