kendo-grid

Convert LLBLGen model class to View Model objects?

☆樱花仙子☆ 提交于 2019-12-12 01:36:48
问题 I do not think I worded the title correctly. I am trying to return results to populate a view. the error message I get in the browser console is "A circular reference was detected while serializing an object of type" all of the documentation says to flatten out the object and exclude properties that are not related to the model. creating a anonymous type is a work around that seems to work for some. I cannot get either to work. if I try something like var Results = from RS in results select

Kendo Grid column resize event makes column wider

馋奶兔 提交于 2019-12-12 01:16:28
问题 I’m using a Kendo Grid with a lot of columns, but some of them are hidden by default. It seems like a Kendo grid bug, but when I try to resize a column it instantly makes itself twice as wider. All columns have a width set as percentage. 回答1: The problem is with Grid’s logic that computes column’s width. If width is a percentage and some are hidden, width is converted to pixels wrong. The solution is to adjust width for each column (on start and column show\hide event), convert to px and

telerik kendoui grid not getting assigned with the parameter from additional data(on demand load of grid)

此生再无相见时 提交于 2019-12-12 01:03:33
问题 Presently I have an issue with loading the grid depends on parameter passed to the grid. I am developing a search page In which I have a textbox and button. I would display the grid on the click event of button taking textbox input text as parameter. My textbox and button: <divid="SearchSection"> <input type="text"id="txtSearch"class="k-textbox"/> <buttonid="btnSearch" class="k-button"style="width:150px">Search</button> </div> My grid: <divid="ADUserSection"> List of users in Active directory

Kendo UI grid drag&drop stops working after adding new record

不问归期 提交于 2019-12-12 00:16:29
问题 I have Kendo UI grid with drag&drop functionality: var data = [ { id: 1, text: "text 1", position: 0 }, { id: 2, text: "text 2", position: 1 }, { id: 3, text: "text 3", position: 2 }, { id: 4, text: "text 4", position: 40 }, { id: 5, text: "text 5", position: 100 }, { id: 6, text: "text 6", position: 600 }, { id: 7, text: "text 7", position: 47000 }, { id: 8, text: "text 8", position: 99999 }, { id: 9, text: "text 9", position: 1000000 }]; var dataSource = new kendo.data.DataSource({ data:

Pagination does not work

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 23:50:20
问题 I've got a Kendo MVC Grid where the pagination does not work. It's loading the resultset in a single page, and clicking the page buttons does not do anything. The script files are loaded correctly and in the right order ( jquery-1.11.2.min.js , kendo.all.min.js and kendo.aspnetmvc.min.js ). I'm using Kendo UI version 2015 Q1 (2015.1.318.545). View @(Html.Kendo().Grid<MyModel>() .Name("Grid") .Columns(columns => { columns.Bound(c => c.Type); columns.Bound(c => c.Count); columns.Bound(c => c

JSON encoded improperly when using KendoGrid POST payload

杀马特。学长 韩版系。学妹 提交于 2019-12-11 23:17:34
问题 I am binding to a JSON data source, then rebinding after the user initiates a search based on filters on the page. The JSON payload is encoded improperly and nothing I've tried thus far seems to explain why. If I could just add the correct JSON to the HTTP post, everything would work normally, and does with the $.ajax method listed first. Using $.ajax call (works) $.ajax( { url: '/api/DataProcessing', type: "Post", contentType: "application/json; charset=utf-8", data: '' + JSON.stringify

Unique array by object property

放肆的年华 提交于 2019-12-11 22:28:10
问题 How do I make an array of objects unique based on a property? In this instance, "field": 0: Object field: "name" operator: "eq" value: "d" 1: Object field: "gridSearch" operator: "contains" value: "1" 2: Object field: "gridSearch" operator: "contains" value: "12" For reference here is the bit of code I'm using where this problem is concerned: $('#gridSearch').keyup(function() { var currentFilters = $('.k-grid').data("kendoGrid").dataSource.filter(); currentFilters.filters.push({ field:

In MVC ,Html Kendo Grid is not passing “&” to the controller from view through Datasource

只谈情不闲聊 提交于 2019-12-11 21:51:32
问题 Kendo grid datasource is not passing values "&" from view to controller in MVC For instance from the below code if testIdVal value is "Interface Class & Function" . Only "Interface Class" are being passed to the controller . .DataSource(Function(d) d.Ajax() _ .Read(Function(read) read.Action("GetResourcesForRolesForRootDomain", "Inquiry", New With {.testId= "#=testIdVal#"}).Type(HttpVerbs.Post).Data("additionalData"))) _ 回答1: Two ideas on that one: Try to add encodeURIComponent around

Kendo grid sort by nullable property

我的未来我决定 提交于 2019-12-11 20:47:02
问题 I am using a html helper for Kendo grid to display some data. The model used by the grid has a DateTime nullable property and I want to display the items in grid sorted descending by myDateTime property, with the null values first. I've managed to display them ordered descending, but the null values are displayed last. Any ideas how could I display the null values first and then the descending sorted values? @(Html.Kendo().Grid<MyVm>() .Name("myGrid") .Columns(columns => { columns.Bound(m =>

Kendo ui grid dropdown editor does not load data

不羁岁月 提交于 2019-12-11 19:35:26
问题 Can not load data to kendo dropdown list. It gets data from backend but list is empty. BackEnd looks like: [HttpPost] public ActionResult GetCities(DataSourceRequest command) { var cityModel = _uow.Cities.GetAll().ToList(); var gridModel = new DataSourceResult { Data = cityModel.Select(PrepareCityModelForList), Total = cityModel.Count }; return Json(gridModel); } Front end schema: { data: "Data", total: "Total", errors: "Errors", model: { id: "Id", fields: { Name: { editable: true, type: