kendo-ui

Could not load file or assembly 'WebGrease' or one of its dependencies

蓝咒 提交于 2019-11-28 19:08:04
When i run my MVC4 Web application it gives me following error: Could not load file or assembly 'WebGrease' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileLoadException: Could not load file or assembly 'WebGrease' or one of its dependencies. The located assembly's

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)

how to get selected row value in the KendoUI

蓝咒 提交于 2019-11-28 15:12:52
问题 I have a kendoUI grid. @(Html.Kendo().Grid<EntityVM>() .Name("EntitesGrid") .HtmlAttributes(new { style = "height:750px;width:100%;scrollbar-face-color: #eff7fc;" }) .Columns(columns => { columns.Bound(e => e.Id).Hidden().IncludeInMenu(false); columns.Bound(e => e.EntityVersionId).Hidden().IncludeInMenu(false); columns.Bound(e => e.Name).Width("70%").Title("Entity Name"); columns.Bound(e => e.EIN).Width("30%"); }) .ToolBar(toolBar => toolBar.Template("<a class='k-button k-button-icontext k

Setting DateTimePicker to show specific time range e.g. working hours only

不打扰是莪最后的温柔 提交于 2019-11-28 13:38:07
I am trying to configure my kendoDateTimePicker to show 9am to 6pm only. Is this possible? var startDateReference = $('.startDate').kendoDateTimePicker({ format: "dd-MM-yy HH:mm:ss", value : new Date(), }).data("kendoDateTimePicker"); startDateReference.timeView.options.min = new Date(2000, 0, 1, 7, 30, 0); startDateReference.timeView.options.max = new Date(2000, 0, 1, 18, 00, 0); This is working for me With Kendo DateTimePicker you can select the min and max dates but not a time range for each day BUT you can do it with TimePicker . Maybe you can decompose your UI in DatePicker and TimePicker

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

How to change the name of file while exporting data to Excel?

橙三吉。 提交于 2019-11-28 12:23:55
How do I change the name of file while exporting data to Excel? <div id="example" class="k-content"> <button type="button"id="btnExport">Export to csv!</button> <div id="grid"></div> </div> <script> $("#btnExport").click(function (e) { var result = "data:application/vnd.ms-excel,"; window.open(result); e.preventDefault(); }); </script> When I click the export button I am getting as download.xls. Is it possible to set the file name as data.xls? Can any one explain me where I need to configure that? kvs here is an example which demonstrates Export HTML Table to Excel With Custom File Name: http:

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

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