kendo-asp.net-mvc

Send Additional Parameter in Kendo Grid Read Action

妖精的绣舞 提交于 2019-12-04 10:08:34
问题 I have a kendo Grid as follows. @(Html.Kendo().Grid<RevenueModel>() .Name("WeeklyRevenue") .Resizable(resizing => resizing.Columns(true)) .Columns(columns => { columns.Bound(p => p.Number).Width(100); columns.Bound(p => p.Type).Width(100); columns.Bound(p => p.Week1).Format("{0:c}"); columns.Bound(p => p.Week2).Format("{0:c}"); columns.Bound(p => p.Week3).Format("{0:c}"); columns.Bound(p => p.Week4).Format("{0:c}"); columns.Bound(p => p.Week5).Format("{0:c}"); columns.Bound(p => p

Kendo Grid Edit InLine Custom Validation message e.g. for duplicate Names etc

你说的曾经没有我的故事 提交于 2019-12-04 08:16:28
问题 I have an entity Location and I am using the Kendu UI Grid with InLine edit mode. The entity owns a property DisplayName , which is required and must not exist twice in the database. At the moment, it works to display the Required Validation message: And it also works to build up a method CustomValidateModel called in the LocationController Ajax InLine Create method, that checks if the Name is already existing in the database and adds then a ModelError . I catch this error then in the .Events

Kendo Grid hierarchy passing ID from master grid

拟墨画扇 提交于 2019-12-04 05:01:44
问题 I have a Kendo Hierarchial Grid where the master grid contains the Client details and the sub grid contains the Point of Contacts . I am able to pass the Client ID from the master grid into the sub grid Read action and the data is loading fine. However, the issue comes while passing the Client ID into a Add New Point of Contact button in the sub grid. If I hard-code the value the Controller method runs fine. However, it is unable to pick the reference Client ID . The sub grid is as follows:

Radio Button doesn't reflect Model's value

…衆ロ難τιáo~ 提交于 2019-12-04 04:31:46
问题 I have a kendo Grid for a class, and for that class I've built an editor template to produce a radio button for one of the fields. This radio button doesn't reflect propertie's value and is always false , although I've checked the value, by printing it on the form, and I'm sure it's true . If I set a default value for that field, the radio button will reflect that value, regardless of the real value of the field. I should note that I'm using a client template to display a text for that field,

Why Is `data(“kendogrid”)` Undefined?

六月ゝ 毕业季﹏ 提交于 2019-12-04 04:05:42
I'm a starter in kendo.ui, I've written this code to create kendo.ui.grid @(Html.Kendo().Grid<BrandViewModel>(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.BrandName); columns.Bound(p => p.BrandAbbr); columns.Bound(p => p.SrcImage); columns.Command(command => command.Custom("Edit").Click("editItem")); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("CustomCommand_Read", "Brand")) .Model(model => model.Id(p => p.Id)) ) ) When the user clicks the edit button in grid it will show Edit view in kendo.ui.window and the user can edit data. @(Html.Kendo()

How to send data to the controller from the Kendo UI TreeView

不问归期 提交于 2019-12-03 20:48:23
I have two TreeViews, one has a list of countries, and the other is empty, now I want drag and drop selected countries into the second tree-view. I don't know how to send data to the controller from the TreeView and there is also some text field on the page in a form. So, how can I send both the form data and the TreeView's data to the controller. Here is the code for the second tree-view which is empty and I want to add the selected nodes to: @(Html.Kendo().TreeView() .Name("treeview-right") .DragAndDrop(true) .Events(events => events .Drag("onDrag") .Drop("onDrop") ) ) Please try with the

mvc 4 razor view do not understand @Html.Kendo()

大兔子大兔子 提交于 2019-12-03 16:23:18
I am facing one problem with Kendo UI server wrappers in ASP.NET MVC 4 If I use .ASPX default view It understands the <%: Html.Kendo().Grid() %> But at the same time If I try to add Razor view It do not understand @(Html.Kendo() ) systax. I have entry in web.config as well <namespaces> <add namespace="Kendo.Mvc.UI" /> <httpHandlers> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> </httpHandlers> <handlers> <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type=

Call a server side MVC action on the click of a Kendo UI button

≡放荡痞女 提交于 2019-12-03 14:12:45
I just download a trial version of v2013.3.1119.440 of the Kendo UI wrappers for ASP.NET MVC. I see a new Kendo.Mvc.UI.Fluent.ButtonBuilder wrapper in this version that wasn't in the version I had downloaded just 20 days ago on another PC. The said wrapper represents a button. I can't see a way to directly wire this Kendo.Mvc.UI.Fluent.ButtonBuilder wrapper with a server side MVC action. How do I do that? I do see the Events method on the ButtonBuilder class, which accepts a Action<ButtonEventBuilder> events. In the ButtonEventBuilder , I see another method called Click , which has two

Format DateTime in Kendo UI Grid using asp.net MVC Wrapper

懵懂的女人 提交于 2019-12-03 05:35:55
问题 I want to build a Kendo UI Grid with format date dd//MM/yyyy. However, all questions that I found about this, it were resolved with code Format("{0:d}"); . So, I have tried like a code below: GridBoundColumnBuilder<TModel> builder = par.Bound(field.Name); switch (field.Type.Type) { case CType.Boolean: builder = builder.ClientTemplate(string.Format("<input type='checkbox' #= {0} ? checked='checked' : '' # disabled='disabled' ></input>", field.Name)); break; case CType.Datetime: builder =

How can I refresh the grid after I edit the Kendo UI grid?

与世无争的帅哥 提交于 2019-12-03 05:33:36
问题 I edit the grid using editable: "popup" as shown on Telerik's demo page. After I edit the grid, I want the grid to refresh. Does the grid have any event that is called after I edit the grid? I tried to use the databound event. In this event I make the datasource read, but it tells me it is an infinite loop to refresh the grid. I tried to use the saveChanges event, but it is not working. @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>() .Name("grid") .Columns(columns => {