kendo-grid

How to add DatePicker in ClientTemplate for Kendo MVC Grid

≯℡__Kan透↙ 提交于 2019-12-10 10:14:09
问题 I am trying to port my code from syncfusion to telerik kendo MVC UI, I need to show Datepicker in Grid cell, and for which I have done in grid column as: columns.Add("TemplateCol").Title("Out of date").TemplateColumn(true).TemplateName("TemplateOutOfDate"); and for TemplateOutOfDate I have made in seperate .cshtml file as @Html.Syncfusion().DatePicker("OutOfDate" + Model.ID.ToString(), Model.OutOfDate).DefaultDate(Model.OutOfDate).DisplayDefaultDateOnLoad(true).DateFormat(Model

kendo UI grid update function wont fire

孤人 提交于 2019-12-10 10:13:08
问题 $('#usersGrid').kendoGrid({ columns: [ { field: "UserName", title: "Display name", width: "140px" }, { field: "Unit", title: "Unit", width: "140px" }, { field: "Email", title: "E-mail", width: "140px" }, { field: "Indienst", title: "Indienst", width: "140px" }, { field: "Uitdienst", title: "Uitdienst", width: "140px" }, { field: "Roles", title: "Roles" }, { command: { text: "edit", click: openEdit } } ], editable: { update: true, create: true }, dataSource: { transport: { read: function

Kendoui Grid Get Selected Row Id when Edit Button is clicked

本秂侑毒 提交于 2019-12-10 08:59:02
问题 I have a simple grid and I'm having a lot of trouble collecting the PersonID when the edit button is clicked using JQuery. I need the PersonID because I'm going to add a file upload to the inline edit column and i want to upload a file and associate it with the PersonID. All help welcome :) @(Html.Kendo().Grid<GridCustomPopupTemplate.Models.Person>().Name("Grid") .DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(m => m.PersonID)) .Read(read => read.Action("GetPersons",

How to prevent Kendo UI Grid from rebinding many times when updating ViewModels

扶醉桌前 提交于 2019-12-10 03:54:31
问题 When you bind to a Kendo UI Grid with MVVM, databound will fire once and all is well. If you need to update that data after the fact, every time you change one piece of data on any viewmodel (or child viewmodel), the entire grid re-databinds. Thus, if you had some cell in the grid that is bound to a template and you have to change 2 or 3 properties on the viewmodel from some external ajax source, Databound will fire 2 or 3 times for each model that is changed, causing the entire viewable area

Using Kendo Grid in PartialView

强颜欢笑 提交于 2019-12-10 00:10:51
问题 I have two <section> in the Index view of my MVC application and I want to render two partial views in these sections. There is no problem rendering a Kendo grid to one Index. However, in order to render data on Kendo Grid, could I use the two methods returning Json in the controller as shown below. Could you give me an example how to achieve this? Controller: public ActionResult Index() { return View(); } public ActionResult Issues_Read([DataSourceRequest]DataSourceRequest request) {

Kendo Grid model with an IEnumerable property not updating correctly after Create/Update when using AJAX binding

空扰寡人 提交于 2019-12-09 17:46:39
问题 I'm having a problem where a property of my model is not being correctly updated when sending it to my controller for an Update or Create call from a Kendo Grid. The model looks like this: public class ReleaseNotesModel { public int NoteID { get; set; } public int ReleaseID { get; set; } public List<TranslationModel> ReleaseNoteTranslations { get; set; } public ReleaseNoteType ItemType { get; set; } } public class TranslationModel { public int TranslationID { get; set; } public string

How to set Kendo UI grid column widths programmatically

可紊 提交于 2019-12-09 16:32:54
问题 I would like to set Kendo UI grid column widths programmatically. I am using the following code: function setColumnWidths(grid, options) { for (var i = 0; i < options.columns.length; i++) { grid.columns[i].width = options.columns[i].width; } } When debugging in chrome after the statements executed, grid.columns[i].width seems to be appropriately set to the new value, however nothing changes in the GUI, the column widths remain the same. What am I missing? 回答1: You need to change grid's width

Kendo Grid does not update the grid with newly created id after creation

依然范特西╮ 提交于 2019-12-09 14:59:22
问题 I am trying to build a very simple Kendo CRUD grid with a table that has only two columns: ID and Name. I have configured the grid with serverside pagination and serverside filtering. Everything seems to function as expected but after the new record is created, the grid shows the new record but without the ID field. On creation, the request has ID null but I am sending the value of id and the full object after creation. In example grids, the grid is updated with new values. What do I need to

How to remove all rows from a Kendo grid

狂风中的少年 提交于 2019-12-09 14:03:50
问题 I am using Kendo grid . I want to remove all rows from Kendo grid using JavaScript . I removed them using a for loop but I want to find the best way to remove all rows. 回答1: try following code. $("#Grid").data('kendoGrid').dataSource.data([]); for demo click here 回答2: That doesn't really move the underlying data of the grid, it just clears the rows being displayed. If you sort the "empty" grid, all the rows reappear form the underlying data. If instead of removing your data as shown like this

Kendo Grid: Canceling edit deletes new row

狂风中的少年 提交于 2019-12-09 11:53:13
问题 Here is a demo to for the behavior I am experiencing. If you edit the existing row with id 1, change the text to something else and then press the cancel button, the row is reverted correctly to its previous state. In order to reproduce my problem you need to: Add a new row Press the update button to save it. Select the row again and press the update button. Press the cancel button The row disappears! Even though there are similar questions on this problem, I have yet to find a satisfactory