kendo-grid

Date format is changing while fetching data using Kendo Grid

青春壹個敷衍的年華 提交于 2019-12-31 05:24:35
问题 I am trying to fetch and load data to a kendo grid using some parameters. But when I am using date parameter, format of date is changing hence showing me wrong dates in server side. As an example as a parameter I am using: new Date("April 01, 2016"). But in server side it becomes 04/01/2016 which is wrong. function passFilterCstDetails() { var statemenetInquiryParameter = {}; statemenetInquiryParameter.isPrintZero = true; statemenetInquiryParameter.isPrintPayments = true;

How to change page size dynamically in Kendo UI Grid

我只是一个虾纸丫 提交于 2019-12-30 02:45:09
问题 I am having a Kendo UI grid showing more than 1000 data. I also have a dropdown list for different page size - 15, 25, 50, 100. On selection of a page size, how can we change the page size of Kendo UI grid? 回答1: You can set the page size in the combobox change event. (Also see JSBin example.) $("#comboBox").kendoComboBox({ dataTextField: "text", dataValueField: "value", dataSource: [ { text: 1 }, { text: 2 }, { text: 3 }, { text: 4 }, { text: 5 } ], change: function(e) { var grid = $("#grid")

Javascript runtime error: “object doesn't support property or method” in Internet Explorer

天大地大妈咪最大 提交于 2019-12-29 08:26:29
问题 I'm using kendo grids and they work fine for the CRUD operations. Now, I wanted to add filtering by adding the .Filterable() option to the grid's specification. Here's some code: <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title("Code"); columns.Bound(c => c.Description).Title("Description"); columns.Bound(c => c.TrafficOpeningDate).Title("Traffic Opening Date"); columns.Bound(c => c

Kendo grid cell refocusing after refresh

此生再无相见时 提交于 2019-12-29 07:55:12
问题 I have a selectable, navigatable and editable grid. After I enter a value in a cell, I have to change the value in the cell under the updated cell. To show the updated values of both cells, I have to refresh the grid. When I do that, the edited cell loses focus. I found a way to refocus the last edited cell during the save event: save: function (e) { var focusedCellIndex = this.current()[0].cellIndex; //gets the cell index of the currently focused cell //...some dataItem saving (dataItem.set(

Kendo data grid - how to set column value from nested JSON object?

余生长醉 提交于 2019-12-29 06:58:10
问题 I have JSON with structure like this: "id":1, "user_role":"ADMIN", "state":"ACTIVE", "address":{ "street":"test 59", "city":"City test", "post_number":"25050" }, How I should to pass values of address.street into column using setting in fields and model? Many thanks for any advice. 回答1: If you want to show all values in a single column do what @RobinGiltner suggests. If you want to show each member of address in a different column you can do: var grid = $("#grid").kendoGrid({ dataSource: data

Cannot display enum values on Kendo grid

吃可爱长大的小学妹 提交于 2019-12-28 19:25:43
问题 In my MVC5 application I have an enum class as shown below and with this approach I can pass the enum values i.e. US, UK instead of United States" from Controller to View. How can I pass and display enum description with the following approach? I tried many different solution method as C# String enums, etc. but none of them solved my problem. On the other hand, I do not want to use sealed class and it would be better for me a solution with enum class as shown below: Enum: public enum Country

Kendo UI MVC inline client-side grid - clicking cancel removes row. Not the model ID issue

旧街凉风 提交于 2019-12-25 16:49:46
问题 I have a Kendo grid set up for client-side only. Whenever I add a row, then edit it, then cancel - it gets removed. Multiple questions have been asked here and on the Kendo forums about this same issue, and all the suggestions point to incorrect setup of the model's ID. Well, in my case the ID seems to be set up correctly. I am assigning a new ID to the model in the onGridSave() javascript event, like this: var _curId = 1; function onGridSave(e) { var newId = _curId++; e.model.set('id', newId

how to Avoid the Unwanted popup window creation while Using two types of editing in a single kendo grid in asp

喜你入骨 提交于 2019-12-25 16:25:35
问题 am Using KEndo Grid .. popup editing For Toolbar and inline Editing for Command $(".k-grid-popup", grid.element).on("click", function () { var popupWithOption = { mode: "popup", template: kendo.template($("#customPopUpTemplate").html()), window: { title: "Your Title" } }; grid.options.editable = popupWithOption ; grid.addRow(); grid.options.editable = "inline"; }); This Code is Working Fine,,If i Click Edit button And Update the Record then i click add button means that 2 popup window will

how to retrieve an instance of kendo scheduler in MVC and add a new property to this

筅森魡賤 提交于 2019-12-25 16:00:13
问题 i have used kendo scheduler like this @(Html.Kendo().Scheduler<myEntity>() .Name("scheduler") .Date(currentDateTime) //.Events(e => { e.Error("error_handler"); }) ); now i want to retrieve the same instance and add another property to it say Events as in .Events(e => { e.Error("error_handler"); }) dynamically. how can i do this 回答1: You can do it in JavaScript (only): var scheduler = $("#scheduler").data('kendoScheduler'); scheduler.bind("error", error_handler); If you wanna set not event

Kendo UI MVC - basic ajax binding

China☆狼群 提交于 2019-12-25 11:02:41
问题 I saw the example referred here So in my application I try to implement it this way: HomeController public ActionResult About([DataSourceRequest]DataSourceRequest request) { List<ShortDetail> listSD = new List<ShortDetail>(); ... fill the list with objects var v = listSD.ToDataSourceResult(request, sd => new ShortDetail { firstname = sd.firstname, surname = sd.surname, classname = sd.classname}); return Json(v, JsonRequestBehavior.AllowGet) } My Model ShortDetail public class ShortDetail {