kendo-grid

How do I check if a Kendo Grid has had changes made to it?

寵の児 提交于 2019-12-09 07:53:56
问题 How can I check if a Kendo Grid has changes? I heard that there is a dirty property, but I cant find it. 回答1: Added rows will have the dirty property set to true and so will updated rows. But, deleted rows are stored elsewhere (in the _destroyed collection). Pass this function the datasource of your grid to see if it has changes. function doesDataSourceHaveChanges(ds) { var dirty = false; $.each(ds._data, function () { if (this.dirty == true) { dirty = true; } }); if (ds._destroyed.length > 0

How to achieve N-level nested hierarchy in Kendo UI Grid using ASP.NET MVC

一笑奈何 提交于 2019-12-09 06:22:26
问题 I am trying to implement N-level nested hierarchy in Kendo UI Grid using ASP.NET MVC i can implement specific number of Nested Grid but how to implement N-level nested Grid using a Specific Data in asp.net MVC @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>() .Name("grid") .Columns(columns => { columns.Bound(e => e.FirstName).Width(110); columns.Bound(e => e.LastName).Width(110); columns.Bound(e => e.Country).Width(110); columns.Bound(e => e.City).Width(110); columns.Bound(e

Why does the KendoUI Grid Transport Create event gets raised multiple times, and even when the action is Update?

假如想象 提交于 2019-12-08 19:32:21
问题 I have put together a fiddle that demonstrates that in the KendoUI 2013.1.319, when editing a record in the grid and press the Update button on the edit dialogue, it actually raises the Transport Create event, instead of the Update event, and it raises it once for each record. Open the following fiddle and press the Edit button on the first record in the grid, and then press the Update button on the edit dialogue, and have a look in the console window and you will see I have logged the event

Cannot export hidden columns in Kendo Grid

僤鯓⒐⒋嵵緔 提交于 2019-12-08 17:32:07
问题 I want to hide some columns on Kendo Grid and export them to the excel as the visible columns. However, using Hidden(true) or Visible(false) does not make any sense and these fields are not exported. The workarounds on this page is not working. Any idea? View: @(Html.Kendo().Grid<ContactViewModel>() .Name("Grid") .Columns(columns => { columns.Bound(m => m.NameSurname).Title("Name Surname").Width("%100"); columns.Bound(m => m.InstituteName).Title("Institute Name").Width("250px"); columns.Bound

Post the Kendo Grid Data on Form Submit

a 夏天 提交于 2019-12-08 16:16:38
问题 I want to Post the data from a Kendo Grid to the server, and save it to a database. For this I have used form like so: @using (Html.BeginForm("MainDocumentSave","Document")) { <div class="row-fluid"> <div class="span10"> @(Html.Kendo().Grid<Invoice.Models.ViewModels.SegmentViewModel>() .Name("Segment") .TableHtmlAttributes(new { style = "height:20px; " }) .Columns(columns => { columns.Bound(p => p.AirlineShortName).EditorTemplateName("AirlineEditor").Title("Airline").ClientTemplate("#

How to set columns dynamically in Kendo template

谁说我不能喝 提交于 2019-12-08 16:14:55
问题 How to set columns dynamically in Kendo template for kendo grid.In my kendo grid,columns are subject to change dynamically based on user preference.How to dynamically create Kendo Template?I am using Kendo JavaScript,I can switch to Kendo MVC if same thing i can achieve there.Is there any other approach to achieve this? <script id="rowTemplate" type="text/x-kendo-template"> <tr class="k-master-row"> <td> <div>#=column1#</div> </td> <td><span class="mydesign" title="column2#"</span></td> <td>

Kendo UI Grid Not showing spinner / load icon on initial read

做~自己de王妃 提交于 2019-12-08 15:45:19
问题 I've set up my kendo ui grid to read data from an MVC action that returns JSON. I'm using the free version of Kendo and not the MVC specific, due to cost. The issue is that when the page loads and does the initial population of the grid it doesn't show the loading spinner. After grid is populated and I go to another page or sort a column it shows up. If I set the height parameter of the grid, I get the initial spinner but the grid only shows one row (should have shown 20). Does anyone know

bind a row data of kendo grid with text boxes onclick?

北城余情 提交于 2019-12-08 11:33:39
问题 Here is my html code , i have to send kendo gridrow data to textboxes onclicking inline edit button of kendo grid but i no want to edit inline. after editting through textboxes i want to show it in kendo grid as edited value <!--data-editable="inline"--> <div id="example"> <div id="kendoGrid" data-role="grid" data-pageable=" true" data-sortable=" true" data-filterable="true" data-toolbar="['create','save', 'cancel']" data-columns="[ { 'field': 'Id', 'width': 100 }, { 'field':

Batch editing in KendoUI Grid for Angular 2/4

送分小仙女□ 提交于 2019-12-08 11:31:22
问题 As per this link https://github.com/telerik/kendo-angular/issues/165 batch editing of the kendo ui grid for angular 2/4 is not available. Has anyone developed a workaround? 回答1: UPDATE Please note, looks like batch editing is supported out of the box now. ORIGINAL ANSWER I was able to change kendo angular grid's custom editing functionality to achieve something in line with batch/cell editing. Here is the plunkr. http://plnkr.co/edit/USYz7LIV5oaOmjSmY7JH import { Component, OnInit, Inject,

Switch off / on Kendo UI grid editable mode

爷,独闯天下 提交于 2019-12-08 11:21:32
I am using a Kendo grid where grid's editable option needs to be switched on / off based some flag. Can somebody help that how can it be achieved. <button class="change-mode">Change Edit Mode</button> $('.change-mode').click(function(){ //Swit ched on /off here based on some flag //console.log($("#grid")); $("#grid").options.editable = false; }); Here is the jsfiddle If you are using the latest release of KendoUI (2014 Q3) you cannot change options directly but you can use setOptions . <button class="change-mode">Change Edit Mode</button> $('.change-mode').click(function(){ //Swit ched on /off