kendo-grid

Kendo UI Grid posting back already Inserted Rows again

淺唱寂寞╮ 提交于 2019-12-02 05:45:20
问题 I am running into problem, where when an Insert is completed successfully and if i continue to insert another row, in the next insert it is also sending the row that was inserted successfully earlier, so it goes like this. On the First insert that row is posted back to webAPI and inserted successfully. On Next Insert Two rows are sent one of them was from first step. On third Insert it send previous two rows as well as third row and so on. What could be the cause of this ? This is the Code in

Kendo Grid hierarchy passing ID from master grid

旧城冷巷雨未停 提交于 2019-12-02 04:16:51
I have a Kendo Hierarchial Grid where the master grid contains the Client details and the sub grid contains the Point of Contacts . I am able to pass the Client ID from the master grid into the sub grid Read action and the data is loading fine. However, the issue comes while passing the Client ID into a Add New Point of Contact button in the sub grid. If I hard-code the value the Controller method runs fine. However, it is unable to pick the reference Client ID . The sub grid is as follows: <script id="template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<Track24.Billing.Web.Models

Kendo Grid Not Saving Values After Moving to the next cell

房东的猫 提交于 2019-12-02 04:00:18
I have tried to modify the behavior of the InCell Edit Mode of kendo Grid. I mean i tried to navigate to cells using arrows but i have a problem in doing So. This is my code: $("#grid").keydown(function (e) { debugger; isEditStarted = true; var totlaColumns = $($(" #grid td")[0]).nextAll().length + 1; currentTD = $(" #grid td.k-edit-cell"); var indexx = $("#grid td").index($(" #grid td.k-edit-cell")); //currentTDIndex = $(currentTD).parent().children().index($(currentTD)) + 1; if (isEditStarted) { var code = e.keyCode || e.which; if (code === 37) { //left Key //var eventEnter = jQuery.Event(

Handling events from a Kendo MVC Grid's PopUp editor window

坚强是说给别人听的谎言 提交于 2019-12-02 03:43:44
I have a Kendo MVC grid that I am creating with the Html.Kendo().Grid helper. When the PopUp editor window opens, I want to catch the event and run a bit of javascript. When I configure a normal kendo window with .Events, the events fire properly and my function runs. However, when I code the .Events property on the .Editable.Window of the grid, the events do not fire. @(Html.Kendo().Grid<FooRecord>() .Name("cFooGrid") .Columns(c => { c.Bound(f => f.Foo); c.Bound(f => f.Bar); c.Bound(f => f.Bas); c.Command(a => a.Edit()); }) .Editable(e => e .Mode(GridEditMode.PopUp) .Window(w => w.Events(v =>

Kendo UI Grid posting back already Inserted Rows again

拈花ヽ惹草 提交于 2019-12-02 01:21:07
I am running into problem, where when an Insert is completed successfully and if i continue to insert another row, in the next insert it is also sending the row that was inserted successfully earlier, so it goes like this. On the First insert that row is posted back to webAPI and inserted successfully. On Next Insert Two rows are sent one of them was from first step. On third Insert it send previous two rows as well as third row and so on. What could be the cause of this ? This is the Code in problem. $(document).ready(function () { try { var degreeYearsArray = new Array(); function

Radio Button doesn't reflect Model's value

耗尽温柔 提交于 2019-12-01 22:16:59
I have a kendo Grid for a class, and for that class I've built an editor template to produce a radio button for one of the fields. This radio button doesn't reflect propertie's value and is always false , although I've checked the value, by printing it on the form, and I'm sure it's true . If I set a default value for that field, the radio button will reflect that value, regardless of the real value of the field. I should note that I'm using a client template to display a text for that field, and it works fine. This is the Grid: @(Html.Kendo().Grid<Class>() .Name("Grid") .Columns(columns => {

Show hidden columns in Kendo grid excel export

跟風遠走 提交于 2019-12-01 21:40:58
问题 I have a kendo grid and I can export its data into excel file without any problem. In my grid, some columns may be hidden because they do not have any value. However, I want even these hidden columns (I mean their header) be in my exported excel file. Here is a piece of code showing the excel config in my Kendo grid configuration. excel: { fileName: new Date().toString() + ".xlsx", allPages: true, }, Any help would be appreciated. 回答1: You can have columns in an array which defines hidden:

Kendo UI Grid - How to Bind to Child Properties

情到浓时终转凉″ 提交于 2019-12-01 20:52:17
How to bind a column/field to a child property of the json result in the model settings of the Kendo grid (in javascript)? For example, I want the grid to contain columns: FName, LName, Street and Address. Basically I want to flatten the hierarchical structure returned by the web service. Kendo Settings fields: { FName: { type: "string" }, LName: { type: "string" }, // How to map to child properties below? Street: { field: "Address.Street" }, // this is wrong City: { field: "Address.City" } // this is wrong } JSON { "FName": "William", "LName ": "Shakespeare", "Address": { "Address": "123

Kendo UI Grid - How to Bind to Child Properties

懵懂的女人 提交于 2019-12-01 20:46:30
问题 How to bind a column/field to a child property of the json result in the model settings of the Kendo grid (in javascript)? For example, I want the grid to contain columns: FName, LName, Street and Address. Basically I want to flatten the hierarchical structure returned by the web service. Kendo Settings fields: { FName: { type: "string" }, LName: { type: "string" }, // How to map to child properties below? Street: { field: "Address.Street" }, // this is wrong City: { field: "Address.City" } /

Kendo UI Grid Serial number column

孤街浪徒 提交于 2019-12-01 18:44:35
问题 I am trying to put the first column of the Kendo grid as the serial index, which is not affected by sorting of the row records. Is there any way I can achieve this? Thank You 回答1: You can implement this using a template column. Here is a live demo showing how to do that: http://jsbin.com/olutin/10/edit 回答2: Script Section <script> var rowNumber = 0; function resetRowNumber(e) { rowNumber = 0; } function renderNumber(data) { return ++rowNumber; } function renderRecordNumber(data) { var page =