kendo-grid

Kendo Grid MVC: default filter for string fields is set to “is equal to”

烂漫一生 提交于 2019-12-24 09:37:27
问题 Kendo Grid has default filter for "dt" field "is equal to" with calendar. For "name" field it has default filter "is equal to", but I want to move "Contains" to a first place of an option list and make it default for strings. How could it be implemented? public class MyClass { public DateTime dt { get; set; } public string name { get; set; } } @(Html.Kendo() .Grid<MyClass>() .Name("grid") .DataSource(data => data.Ajax() .ServerOperation(false) .Read(read => read.Action("MyAction",

Export hidden fields to Excel using KendoGrid throw error

拥有回忆 提交于 2019-12-24 08:23:17
问题 I have a button Export Excel: <script type="text/x-kendo-template" id="template"> <div class="toolbar"> <button id="ExportExcel" class="btn btn-default " onclick="ExportExcel(); return false;"><i class="fa fa-file-excel-o"></i> Exportar</button> </div> </script> Normally I have a function to Export Excel like this: function ExportExcel() { $("#lstEmployees").data("kendoGrid").saveAsExcel(); // export grid to excel } And below I populate grid like this: function onPageOperationsSuccess

Presetting kendo DataSource PageSize to “All”

萝らか妹 提交于 2019-12-24 06:40:32
问题 Whenever a user changes the pagination on a grid, I save the setting in localStorage and retrieve it to set it back whenever the user navigates again to the page. To retrieve it I am using the pageSize property of the dataSource where I pass an IIF like so: pageSize: function () { var pageSize = 10; if (window.localStorage) { var userPreferencePageSize = localStorage.getItem("somegridPageSize"); if (userPreferencePageSize === parseInt(userPreferencePageSize)) { userPreferencePageSize =

ModelState.IsValid is always false because of datetime.now

China☆狼群 提交于 2019-12-24 06:01:07
问题 I have an ASP.NET MVC application and in the edit and create actions I set date field of my class by datetime.now . Everything works fine and I can add and edit records. But when I want to delete those records ModelStata.IsValid is always false and the error is "The value '4/25/2015 9:34:39 AM' is not valid for register time." Register time is display name of my field. Here is my actions code: public ActionResult Create([DataSourceRequest]DataSourceRequest request, InvtGroups invtGroup) { if

How to copy paste an entire row with in the same grid in Kendo UI Jquery

南楼画角 提交于 2019-12-24 04:31:14
问题 We can copy paste the value of a cell into other cells when we are batch editing . Now want to know weather we can copy paste an entire row with in the same grid. Found this http://www.telerik.com/forums/copy-and-paste-rows-in-kendo-ui-asp-net-mvc-grid but its between grids and requires selection and keyboard navigation to be disabled, but i need selection and keyboard navigation and selection functionality. 回答1: The easiest way is working at model level. I.e. identify the data corresponding

kendoui:grid - set pager on top and bottom of the grid

橙三吉。 提交于 2019-12-24 04:29:07
问题 Have kind of simple situation can't find solution for. Kendo-UI only implements grid pagination on the bottom. I tried to make it show pager on top, but it becomes unclickable. I think my clone section is wrong, but don't know how to fix it. Thanks in advance guys. here is script and part of jsp... <kendo:grid name="grid" pageable="true" dataBound="onBound"> <kendo:dataSource serverPaging="true" serverSorting="true"> <kendo:dataSource-transport> <kendo:dataSource-transport-read url="api/items

Lost the text boxes values inside the filter menu

自闭症网瘾萝莉.ら 提交于 2019-12-24 03:45:22
问题 I writting a html/javascript page with a kendo grid with filter menu. I have faced the following problem: when I add a new object to the data source (new row) and its kendogrid is reloaded (datasource.read) I lose the textboxes values inside the filter menu that I was inputting the values. Here is the demo: http://jsfiddle.net/3qT3J/2/ $("#grid").kendoGrid({ dataSource: datasource1, height: 300, filterable: true // <== shows a button on each column that display a filter menu }); // reload the

Maximum call stack exccedwith using KendoUI grid and breeze.js

烈酒焚心 提交于 2019-12-24 02:38:12
问题 I'm facing a problem to integrate breeze.js and kenoui grid . I have an observable array in my view model , I fill this array calling ajax operation . when I wire the array to the grid I get an exception "Maximum call stack exceeded" . I read a post that the grid has a problem with the entityacpect inside breeze.js entity. Is there any hot fix for this problem , or any other suggestion. Thanks in advance ... 回答1: This is a standard circular reference javascript serialization issue. It is not

How to add custom keyboard navigation between editable cells in Kendo Grid

蓝咒 提交于 2019-12-24 02:00:48
问题 As a continuation of this Question and Answer: How do I implement a custom keypress handler for a Kendo Grid enabling the following: Arrow Keys navigate up and down rows The Cell contents are saved to the grid when navigating away The next Cell's editor is opened 回答1: I'll answer my own question with information found in the question in the Question, this question, the kendo.grid.js source, and my own experimentation. If anyone else has a better solution, I'll happily accept it instead. //

How to prompt user that edits have been made upon changing pages or sorting in Kendo Grid

别等时光非礼了梦想. 提交于 2019-12-24 01:39:49
问题 I have run into an issue with the kendo-ui grid that I can't solve. In my application I am using kendo-grid in batch edit mode to allow a data entry person to quickly make edits to several records on a screen. This particular grid is set to allow paging and sorting. I am looking for a way to prompt the user upon attempting a sort or clicking on one of the paging links while there have been edits made on the particular page (as in page of the datagrid/datasource). If the user clicks OK, then I