kendo-grid

Error The length of the string exceeds the value set on the maxJsonLength property

可紊 提交于 2019-11-30 11:50:00
问题 I am currently have a grid with PDF attachment. Each PDF can have file size up to 1MB. The problem is I am getting the value " Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property " I already placed the following in the web.config but the problem is it works only if the Kendo UI Grid needs to display 6 records. <system.web.extensions> <scripting> <webServices> <jsonSerialization

How Can I Hide Kendo UI Grid Columns using JavaScript, React, Angular, Vue or ASP.NET MVC

血红的双手。 提交于 2019-11-30 11:35:03
问题 I'm working on a HTML5 and JavaScript website. Is it possible to have a hidden column in Kendo UI Grid and access the value using JQuery? 回答1: Using JavaScript See the Kendo UI API reference. Hide a column during grid definition You can add hidden: true : $("#gridName").kendoGrid({ columns: [ { hidden: true, field: "id" }, { field: "name" } ], dataSource: [ { id: 1, name: "Jane Doe" }, { id: 2, name: "John Doe" } ] }); Hide a column by css selector $("#gridName").find("table th").eq(1).hide()

kendo grid delete command not working

陌路散爱 提交于 2019-11-30 11:29:47
i have developed a web application using kendo ui tools and theres a kendo grid with batch edit mode .. but when i press the delete button for any record in kendo grid it will erase from the list in grid but actually not in the data source.when i reload the page or grid the deleted item will still exist.. here is the code of my grid <div id="grid"> </div> <script type="text/javascript"> $("#submitMarketUser").click(function () { var grid = $("#grid").data("kendoGrid"); var dataSource = new kendo.data.DataSource({ transport: { read: { url: "WholeSaleTrade/GetTradeProductDetail", dataType: "json

Kendo Grid Foreign key column bind dynamically

北城余情 提交于 2019-11-30 10:19:08
@(Html.Kendo().Grid((IEnumerable<Doc.Web.Models.Common.ContactModel>)Model.contact_lst) .Name("grid") .Columns(columns => { columns.Bound(o => o.ContactID).Visible(false); columns.Bound(o => o.ContactName).Title("Contact Name"); columns.ForeignKey(p => p.CPOID, (System.Collections.IEnumerable)ViewData["CPOs"], "cpo_id", "contract_po") .Title("Company - Contact/Purchase Order"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(182); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Filterable()

Exporting all data from Kendo Grid datasource

我的梦境 提交于 2019-11-30 10:00:28
I followed that tutorial about exporting Kendo Grid Data : http://www.kendoui.com/blogs/teamblog/posts/13-03-12/exporting_the_kendo_ui_grid_data_to_excel.aspx Now I´m trying to export all data (not only the showed page) ... How can I do that? I tried change the pagezise before get the data: grid.dataSource.pageSize(grid.dataSource.total()); But with that my actual grid refresh with new pageSize. Is that a way to query kendo datasource without refresh the grid? Thanks A better solution is to generate an Excel file from the real data, not from the dataSource. 1] In the html page, add $('#export'

Kendo Grid scroll to selected row

China☆狼群 提交于 2019-11-30 09:11:40
I want to be able to call a function that scrolls the Kendo grid to the selected row. I´ve already tried some methods but none of them worked, for instance I tried this: var grid = $("#Grid").data("kendoGrid"), content = $(".k-grid-content"); content.scrollTop(grid.select()); I´ve also tried this: var gr = $("#Grid").data("kendoGrid"); var dataItem = gr.dataSource.view()[gr.select().closest("tr").index()]; var material = dataItem.id; var row = grid.tbody.find(">tr:not(.k-grouping-row)").filter(function (i) { return (this.dataset.id == material); }); content.scrollTop(row); Can anyone point me

How to handle a Kendo UI Grid row double-click event

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 09:04:18
I have a selectable KendoUI grid in my MVC app. I want to do something when the user double-clicks on the grid. I don't see a double-click event for the grid. How may I handle the double-click event when there is none exposed? EfrainReyes Use the standard double click event. The first click will select the grid row, adding a .k-state-selected class to it, and the second click will trigger the double click event. $("#yourgridname").on("dblclick", "tr.k-state-selected", function () { // insert code here }); You can also use dataBound dataBound: function (e) { var grid = this; grid.tbody.find("tr

Get a reference to Kendo Grid from inside the error handler

眉间皱痕 提交于 2019-11-30 08:48:43
There already are questions how to get custom error handling, with answers , but all those answers use 'external' reference/selector to the grid to make it work, for example: function onError(e) { if (e.errors) { var message = "Error:\n"; var grid = $('#gridID').data('kendoGrid'); // <<- here (...) } Is it possible to get the reference to the grid from inside the error handling function without providing the selector by hand or 'externally' (because global variables are meh )? That way the error handling script could be totally self-contained. Patryk Ćwiek Version 'current' as of 2015-12-05

How to call refresh() on a kendo-grid from an Angular controller?

我只是一个虾纸丫 提交于 2019-11-30 08:37:38
问题 I'm attempting to follow several suggestions on refreshing a kendo-grid such as this. The essential is that in the html I have: <div kendo-grid="vm.webapiGrid" options="vm.mainGridOptions"> Then in the controller I have: vm.webapiGrid.refresh(); Note: I'm using the ControllerAs syntax so I am using "vm" rather than $scope. My problem is that "vm.webapiGrid" is undefined. This seems so straightforward, but I'm not sure why it is undefined. 回答1: Found the answer. One other method of refreshing

Kendo grid image column

我怕爱的太早我们不能终老 提交于 2019-11-30 08:31:33
问题 working on a MVC4 project, I'm trying to add a column to my kendo grid that displays an image. <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title(ViewBag.lblCode); columns.Bound(c => c.Description).Title(ViewBag.lblDescription); columns.Template(@<text> <img src='@item.Image' /> </text> ).Title("Image"); }) I've tried that but no luck. Also tried: columns.Template(@<text> <img src='../.