kendo-grid

How to transpose rows and columns in a Kendo UI grid in MVC application?

ぃ、小莉子 提交于 2019-12-05 20:23:59
I am using Kendo Ui Grid in my MVC application. I wish to display statistical data for multiple countries in my grid. The way I retrieve data from the database, my grid would show data a bit like the following: Country Area Population GDP GDP Growth India 3288000 1220200000 1.848 6.8 USA 9827000 314686189 15.09 1.7 But instead of the format above, I wish it show like the following: Country India USA Area 3288000 9827000 Population 1220200000 314686189 GDP 1.848 15.09 GDP Growth 6.8 1.7 How could I achieve this transposition? If any one will stumble upon this issues, most important you need to

How can I force Kendo Grid to use a numeric filter on a column

爱⌒轻易说出口 提交于 2019-12-05 19:36:47
Using the following code, Kendo Grid uses the string filter interface for t.Files.Count even though the type is an int . How can I force the grid to use the numeric filter UI instead? @(Html.Kendo().Grid<GJW_Site.Web.Models.TargetsModel>() .Name("grid") .Columns(columns => { columns.Bound(t => t.ID).Width(80); columns.Bound(t => t.OrbitalPeriod); columns.Bound(t => t.Files.Count); }) .Sortable() .Filterable() .DataSource(dataSource => dataSource.Ajax() .PageSize(20) .Read(read => read.Action("Targets_Read", "Targets")) ) .Resizable(o => o.Columns(true)) .ColumnMenu() ) Produces a filter menu

Kendo grid data export to a excel file

廉价感情. 提交于 2019-12-05 18:13:35
I have configured the kendo grid and configured all the table rows and header.When I click export button it is generating an excel file.But where the problem occur I don't know with same configuration I have done in IE there instead of generating file it was showing the data format in URL with data:application/vnd.ms-excel,<table><tr><th>OrderID</th><th>Freight</th>..... var grid = $("#grid").kendoGrid({ dataSource: { type : "odata", transport : { read: "http://demos.kendoui.com/service/Northwind.svc/Orders" }, schema : { model: { fields: { OrderID : { type: "number" }, Freight : { type:

Multi-column Headers With Kendo Grid

孤人 提交于 2019-12-05 18:04:01
I don't know what this is called, and I've messed around a lot with the headerTemplate but can't figure out how to produce this look. I need the second row of column names to 'act normally' in terms of sorting and filtering, but everything I try breaks that. I have no idea if headerTemplate is even the right way to do this? Is there a name for this kind of grouping? My research is turning up a whole lot of nothing, so I suspect I'm using the wrong keywords. What is this layout called? Note: for security reasons I can't post a code dump (super nervous about the image too). If a specific thing

Kendo grid Insert new record on the last page, last row position

左心房为你撑大大i 提交于 2019-12-05 16:56:32
I'm using kendo grid in inline GridEditMode and GridInsertRowPosition set to bottom. Ajax is used for the data binding. Sorting is enabled and sorted by DateTime field. Page size is set to 10. To problem occur when there are multiple pages (more that 10 records). I have a javascript function that jumps to the last page and show new row at the bottom. But on some point sort event is triggered, and grid moves to read only mode. Is there a possibility to prevent Grid sorting only for the case when new row is added? Any help is welcome. Thank you! You should define a custom command in your toolbar

The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document

痞子三分冷 提交于 2019-12-05 16:27:56
I have a Mvc with angular application. There are two layout files : Loginlayout: - Default layout MasterLayout: When click the Movie button , call the Movie Controller and Movie action. public ActionResult Movie() { return View(); } Its using mainlayout file: In Mainlayout file i have mentioned <script src=" https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"></script> @Scripts.Render("~/bundles/bootstrap") <script src="https://code.angularjs.org/1.3.8/angular.js"></script> <script src="//kendo.cdn.telerik.com/2016.2.714/js/kendo.all.min.js"></script> <script src="https://code

How to unselect the grid record in kendoui

冷暖自知 提交于 2019-12-05 14:23:36
问题 I am selecting the listview record on databound event. I have written the following code in databound var grid = $("#grid").data("kendoGrid"); grid.select(grid.tbody.find(">tr:first")); Now i want to deselect the grid dynamically. How can I do that? 回答1: Use clearSelection: var grid = $("#grid").data("kendoGrid"); grid.clearSelection(); 回答2: kendo grid has a property called selectable:true ..this would select the entire row when clicked upon and to de-select the row simply press ctrl+the row

kendogrid filter menu closing on mouseleave

╄→尐↘猪︶ㄣ 提交于 2019-12-05 12:25:59
in a kendogrid with kendogrid.columnMenu: true like this http://jsbin.com/AsEtoDik/2 there's a very annoying behavior: when you try to set a filter and the mouse goes out of the filter panel, it closes. It happens a lot especially filtering on a date column. I guess this is intended but it's not very user friendly. I thought about setting a timer after the mouseleave event, delaying the closure of the menu, in jQuery but it looks rather difficult and I'd appreciate some help or suggestion You can disable this behavior by replacing the Kendo Menu _mouseleave method (before you create the first

Adding custom button to KendoGrid Toolbar Issue

一个人想着一个人 提交于 2019-12-05 11:38:46
Hi I've added a button to the toolbar of my KendoUI Grid, but I have a couple of issues, I'm hoping someone can assist with. I've tried to add one of the kendo web icons next to the button but it doesn't render. When I click the button in the toolbar I see the following error in the console: Uncaught ReferenceError: sendEmail is not defined. I don't understand why it isn't seeing my function. Just for testing purposes I'm displaying an alert until it sees it. toolbar: [ { name: "create", text: "Add" }, { template: "<input type='button' class='k-button' value='Email Users' onclick='sendEmail()'

Kendo-Grid column field validation

六眼飞鱼酱① 提交于 2019-12-05 09:52:37
I am working on populating kendo--grid with APIs data but on adding validation on one field is automatically working for every other fields too. Here is schema inside kendo-dataSource : schema: { model: { id : "id", fields: { id: { editable: false, type: 'number'}, name: { editable: true, type : "string" }, unique_url: { editable: true , type: 'string'}, image_url : { editable: true, type : "string" }, title: {type : "string", validation: { required: true, validateTitle: function (input) { console.log("I am inside validation",input.val()); if (input.val().length > 5) { input.attr("data