kendo-ui

Method parameter with (attribute) in brackets

末鹿安然 提交于 2019-12-30 11:05:21
问题 I have a code example from KendoUI. public ActionResult Customers_Read([DataSourceRequest]DataSourceRequest request) { return Json(GetCustomers().ToDataSourceResult(request)); } private static IEnumerable<CustomerViewModel> GetCustomers() { var northwind = new SampleEntities(); return northwind.Customers.Select(customer => new CustomerViewModel { CustomerID = customer.CustomerID, CompanyName = customer.CompanyName, ContactName = customer.ContactName, // ... }); } This example works fine. I am

How to add Kendo UI HTML helpers to my ASP.net MVC 4 project?

血红的双手。 提交于 2019-12-30 10:26:22
问题 Simple question: I've installed Telerik DevCraft Ultimate on my workstation. I've looked at the examples showing the use of the Kendo UI HTML helpers. What reference do I add to my project to be able to use them? 回答1: Configure your ASP.NET MVC layout page to include the Kendo UI Web JavaScript and CSS files: <link rel="stylesheet" href="@Url.Content("~/Content/kendo.common.min.css")"> <link rel="stylesheet" href="@Url.Content("~/Content/kendo.default.min.css")"> <script src="@Url.Content("~

Kendo-ui MVC PopUp editor: How to hide fields

喜欢而已 提交于 2019-12-30 06:36:06
问题 I'm using Kendo ASP.NET MVC and I would like to have some control over the edit form. Things I would like to do: Hide my ID field Change my Property Code and Square Feet to regular TextBoxFor fields Change Date of Purchase and Date of Sale to Kendo DatePickerFor instead of the DateTimePickerFor that is showing. Link to screenshot of editor form 回答1: When you click edit, Kendo uses the default EditorTemplate for the object. If you're not familiar how editor templates work, check this article.

Kendo MVC Grid: Creating a Custom command button and passing parameters

99封情书 提交于 2019-12-30 06:16:08
问题 I'm trying to create a custom command button to fire a custom delete function. I need to pass the ID of my model to my custom delete function. You'll notice that I'm trying to pass in a static '5' as a test but I would like to pass in the ID of the row. Any help would be greatly appreciated. @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.Name).Width(240); columns.Bound(p => p.City).Width(170); columns.Bound(p => p.State).Width(170); columns.Command(command

How to change page size dynamically in Kendo UI Grid

我只是一个虾纸丫 提交于 2019-12-30 02:45:09
问题 I am having a Kendo UI grid showing more than 1000 data. I also have a dropdown list for different page size - 15, 25, 50, 100. On selection of a page size, how can we change the page size of Kendo UI grid? 回答1: You can set the page size in the combobox change event. (Also see JSBin example.) $("#comboBox").kendoComboBox({ dataTextField: "text", dataValueField: "value", dataSource: [ { text: 1 }, { text: 2 }, { text: 3 }, { text: 4 }, { text: 5 } ], change: function(e) { var grid = $("#grid")

Javascript runtime error: “object doesn't support property or method” in Internet Explorer

天大地大妈咪最大 提交于 2019-12-29 08:26:29
问题 I'm using kendo grids and they work fine for the CRUD operations. Now, I wanted to add filtering by adding the .Filterable() option to the grid's specification. Here's some code: <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title("Code"); columns.Bound(c => c.Description).Title("Description"); columns.Bound(c => c.TrafficOpeningDate).Title("Traffic Opening Date"); columns.Bound(c => c

Kendo scheduler resources paging

[亡魂溺海] 提交于 2019-12-29 08:15:09
问题 in kendo scheduler control am using group header template and would like to make a paging in my resources view http://dojo.telerik.com/IMUjA this example has 2 only resources if I would like to add 2 another resources I want to show only 2 resources per page and would like to have next/prev buttons to change resources viewed as paging in scheduler displaying 回答1: I want something such as the example I made in this link: dojo.telerik.com/uBigO/4 I would like to control my resources to view

Kendo grid cell refocusing after refresh

此生再无相见时 提交于 2019-12-29 07:55:12
问题 I have a selectable, navigatable and editable grid. After I enter a value in a cell, I have to change the value in the cell under the updated cell. To show the updated values of both cells, I have to refresh the grid. When I do that, the edited cell loses focus. I found a way to refocus the last edited cell during the save event: save: function (e) { var focusedCellIndex = this.current()[0].cellIndex; //gets the cell index of the currently focused cell //...some dataItem saving (dataItem.set(

Kendo data grid - how to set column value from nested JSON object?

余生长醉 提交于 2019-12-29 06:58:10
问题 I have JSON with structure like this: "id":1, "user_role":"ADMIN", "state":"ACTIVE", "address":{ "street":"test 59", "city":"City test", "post_number":"25050" }, How I should to pass values of address.street into column using setting in fields and model? Many thanks for any advice. 回答1: If you want to show all values in a single column do what @RobinGiltner suggests. If you want to show each member of address in a different column you can do: var grid = $("#grid").kendoGrid({ dataSource: data

Tabstrip containing bootstrap columns

 ̄綄美尐妖づ 提交于 2019-12-29 04:42:26
问题 I have a Kendo tabstrip and I'm trying to put two divs with the col-md-6 class side by side inside a tabstrip item. Instead of having 2 columns, they stack on top of each other. If I change any of them to col-md-5 or smaller, they work correctly. Has anyone had this problem and found the culprit? 回答1: This might be more of a 'hack' than a fix, but this is how we got around it create a class, lets call it boxFix .boxFix *, .boxFix *::before, .boxFix *::after { -moz-box-sizing: border-box