kendo-grid

Setting Kendo UI grid height 100% of wrapper

只愿长相守 提交于 2019-11-28 19:42:07
I know there is an easy way to set fixed height of a Kendo UI grid through their API but for our specific needs, I need to make the grid expand in full height of its wrapper. With the following markup structure, I set .wrapper to height:600px and I tried to give .k-grid-content height:100% but it doesn't expand. #grid expands to 100% with height:100% but I need the inside contents to expand as well. How do I achieve that? Here is the demo JS BIN <div class="wrapper"> <div id="grid"> <div class="k-grid-header"></div> <div class="k-grid-content"></div> <div class="k-grid-pager"></div> </div> <

Display a message within the Kendo grid when it's empty

霸气de小男生 提交于 2019-11-28 17:46:28
I'm trying to display a friendly message (like "No records found, try again later" ) within the grid content, when there are no records in the database. From what I've seen in the docs , there is currently no way of doing this for the grid content. It's only doable for the footer. You can see the example in this fiddle: http://jsfiddle.net/lav911/uNWXJ/ I've purposely misspelled the data route, in order to have an empty grid. To see it with content, simply comment / uncomment these lines: transport: { // read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers" read: "http:/

Refresh a single Kendo grid row

有些话、适合烂在心里 提交于 2019-11-28 17:03:19
问题 Is there a way to refresh a single Kendo grid row without refreshing the whole datasource or using jQuery to set the value for each cell? 回答1: How do you define the row that you want to update? I'm going to assume that is the row that you have selected, and the name of the column being updated is symbol . // Get a reference to the grid var grid = $("#my_grid").data("kendoGrid"); // Access the row that is selected var select = grid.select(); // and now the data var data = grid.dataItem(select)

Kendo Grid Inline Edit with Drop Down option disabled

一曲冷凌霜 提交于 2019-11-28 12:26:22
问题 I have a Kendo Grid with inline edit options. I have a dropdown from which user have to select values. I want to disable certain items from the dropdown dynamically. I have to dynamically enable and disable options from dropdown so I store disabled objects in a separate array than source. Here is an example. columns: [{ field: "xxxx", title: "xxxx", template: function (dt) { return dt.xxxx; }, editor: function (container, options) { $('<input name="' + options.field + '"/>') .appendTo

Kendo UI grid and custom popup delete confirmation

拜拜、爱过 提交于 2019-11-28 11:51:52
问题 I've got a kendoui grid and I'm using it inside a metronic template... I wish to change the delete confirmation popup (not the text) with a colored better one . I'm using MVC Kendo helpers to create the grid and as far as I've seen there's no piece of code where intercept the popup message (ex. http://www.keenthemes.com/preview/metronic/theme/templates/admin/ui_confirmations.html Event Handling) anyone has success with it? Thanks in advance 回答1: The delete confirmation popup is a build-in

Cannot display enum values on Kendo grid

本秂侑毒 提交于 2019-11-28 11:50:19
In my MVC5 application I have an enum class as shown below and with this approach I can pass the enum values i.e. US, UK instead of United States" from Controller to View. How can I pass and display enum description with the following approach? I tried many different solution method as C# String enums , etc. but none of them solved my problem. On the other hand, I do not want to use sealed class and it would be better for me a solution with enum class as shown below: Enum: public enum Country { [Description("United States")] US = 1, [Description("United Kingdom")] UK = 2, [Description("New

Kendo grid server side grouping

浪尽此生 提交于 2019-11-28 11:43:10
I am using Asp net 5, NHibernate 3.3 and Kendo UI MVC wrapper for grid to render the table of client orders. There are lots of orders in database already and the number is constantly growing. So I decided to use server side paging to avoid fetching all orders from database. As far as I know you can't do paging manually and delegate filtering, sorting and grouping to ToDataSourceResult method. It's either all or nothing. Therefore I made an attempt to implement so called 'custom binding' . No problem until I get to grouping. I need to group first, then sort inside of a group, then extract data

How Can I Have Row Number In Kendo UI Grid

为君一笑 提交于 2019-11-28 11:29:46
I have kendo grid in asp.net mvc and i use server wrapper.I want Additional column named "Row Number" that is simple counter (1,2,3,...). I want this counter never change by client sorting. Always first row be 1 second row be 2 ,... in column "RowNumber" how can I do this in kendo grid ? You can use the dataBound event: $("#grid").kendoGrid({ sortable: true, dataSource: [{ name: "Jane Doe", age: 30 }, { name: "John Doe", age: 33 }], columns: [{ field: "name" }, { field: "age" }, { field: "rowNumber", title: "Row number", template: "<span class='row-number'></span>" }], dataBound: function () {

Uncaught TypeError : cannot read property 'replace' of undefined In Grid

女生的网名这么多〃 提交于 2019-11-28 10:57:14
I'm new in using Kendo Grid and Kendo UI . My question is how can i resolve this Error Uncaught TypeError: Cannot read property 'replace' of undefined This is my Code on my KendoGrid $("#Grid").kendoGrid({ scrollable: false, sortable: true, pageable: { refresh: true, pageSizes: true }, dataSource: { transport: { read: { url: '/Info/InfoList?search=' + search, dataType: "json", type: "POST" } }, pageSize: 10 }, rowTemplate: kendo.template($("#rowTemplate").html().replace('k-alt', '')), altRowTemplate: kendo.template($("#rowTemplate").html()) }); Line that Causes the Error rowTemplate: kendo

Sorting kendo grid on multiple columns

∥☆過路亽.° 提交于 2019-11-28 07:41:02
问题 i have a kendo grid. When the page loads, by default i want to sort the grid by column1 then by column2 in descending order. Issue: Its sorting as expected however sort arrow shows up on last sorted column. So in the case below when the page loads the sort arrow is on "DueDate" instead of "DownloadDate" @(Html.Kendo().Grid<TrackingVM>() .Name("Grid") .Columns(col => { col.Bound(p => p.ID).Hidden(); col.Bound(p => p.Year); col.Bound(p => p.State); col.Bound(p => p.DueDate).Format("{0:MM/dd