kendo-ui

How to return ModelState errors to Kendo grid in MVC Web API post method?

穿精又带淫゛_ 提交于 2019-12-01 15:38:01
I haven't been able to find an example of Kendo + MVC Web API where post/update methods return validation errors. It doesn't look like there is a Kendo extension that could make the following code work. public HttpResponseMessage Post([ModelBinder(typeof(Prototype.WebApi.ModelBinders.DataSourceRequestModelBinder))][DataSourceRequest] DataSourceRequest request, User user) { if (this.ModelState.IsValid) { //save } return Request.CreateErrorResponse(HttpStatusCode.BadRequest, this.ModelState.ToDataSourceResult()); } becaue ModelState in this context is System.Web.Http.ModelBinding

Controlling Group order in a Kendo UI Grid

帅比萌擦擦* 提交于 2019-12-01 15:37:21
Is there a way to control the order of the grouping in a Kendo UI grid. There is a group I would like to go before all other groups, but it seems Kendo UI grid sorts the groups alphabetically. I know that adding a space to the grouping name works but that's seems very hackish. Thanks Leo There is currently no way to sort a grouping on something other than the group's field. Having a way to sort groups like Telerik does in their non-Kendo grids is my biggest feature request for them right now. So we are stuck using hacks for now. One hack that works for me is to combine the sorting field and

Find TabStrip index

时光怂恿深爱的人放手 提交于 2019-12-01 15:23:52
Is it possible to find the index of a tab in a KendoUI TabStrip? I need to find the index (number) of the tab that I select and I know that select() returns me current tab but I don' t know how to convert this to the number. Found the solution: $("#tabstrip").data("kendoTabStrip").select().index(); Azarsa function select(e) { var x = e.item; var index= $(e.item).index(); $(".tabindex").val(index); } as nemesv said in https://stackoverflow.com/a/15646629/2127493 来源: https://stackoverflow.com/questions/13606544/find-tabstrip-index

how to set LoadContentFrom kendo window in run time

馋奶兔 提交于 2019-12-01 14:24:51
i'm starter in kendo ui, i want use kendoUi window but i have some problem for use i write this code for create window @(Html.Kendo().Window().Name("Details") .Title("Customer Details") .Visible(false) .Modal(true) .Draggable(true) .Width(300) ) in page i have some button , i want when user click in one of this button set LoadContentFrom dynamically with jquery. But I do not know how to do it. please help me. thanks all. you can try this $("#youbuttonID").bind("click", function() { $("#Details").data("kendoWindow").open(); }); to load conent from use @(Html.Kendo().Window().Name("Details")

Find TabStrip index

ε祈祈猫儿з 提交于 2019-12-01 14:23:03
问题 Is it possible to find the index of a tab in a KendoUI TabStrip? I need to find the index (number) of the tab that I select and I know that select() returns me current tab but I don' t know how to convert this to the number. 回答1: Found the solution: $("#tabstrip").data("kendoTabStrip").select().index(); 回答2: function select(e) { var x = e.item; var index= $(e.item).index(); $(".tabindex").val(index); } as nemesv said in https://stackoverflow.com/a/15646629/2127493 来源: https://stackoverflow

How to return ModelState errors to Kendo grid in MVC Web API post method?

左心房为你撑大大i 提交于 2019-12-01 14:19:46
问题 I haven't been able to find an example of Kendo + MVC Web API where post/update methods return validation errors. It doesn't look like there is a Kendo extension that could make the following code work. public HttpResponseMessage Post([ModelBinder(typeof(Prototype.WebApi.ModelBinders.DataSourceRequestModelBinder))][DataSourceRequest] DataSourceRequest request, User user) { if (this.ModelState.IsValid) { //save } return Request.CreateErrorResponse(HttpStatusCode.BadRequest, this.ModelState

How to use ComboBox as Kendo UI grid column?

喜夏-厌秋 提交于 2019-12-01 12:42:38
问题 I'm working with a kendo grid and I'm trying to make Name field a combobox that has it's own datasource. I'm not getting a javascript error, but when I go to edit the name field in the grid, it is not showing a ComboBox. It still shows an input field. $(function () { console.log("ready"); var datasource = new kendo.data.DataSource({ transport: { read: { url: "", // Returns all items dataType: "json" } }, pageSize: 10, schema: { model: { id: "Id", fields: { Id: { type: "number", editable:

Implementing Autocomplete as a hideable listview (demo included)

百般思念 提交于 2019-12-01 12:23:39
The start page of my application will have a search box, and a list of useful links below the searchbox (favorites etc) When someone types text in the searchbox, I want the favorites to disappear, and only the search results to be visible. I've implemented a proof of concept here using a mobile list view: $("#local-filterable-listview").kendoMobileListView({ dataSource: dataSource, template: $("#mobile-listview-filtering-template").text(), filterable: { field: "ProductName", operator: "startswith" }, virtualViewSize: 100, endlessScroll: true }); I'm considering instead of setting the display

Why doesn't my KendoGrid call my MVC controller?

这一生的挚爱 提交于 2019-12-01 11:57:26
问题 I have the following code in a standard C# ASP.NET MVC controller. public JsonResult ReadTeachers() { return Json(ReadTeacherData(), JsonRequestBehavior.AllowGet); } public void UpdateTeachers(IEnumerable<Teacher> updatedTeachers) { // this is never called } I'm trying to call this controller with a KendoGrid. Here is the code for my grid. $("#teachers").kendoGrid({ dataSource: { type: "json", transport: { read: { url: '@Url.Action("ReadTeachers", "EducationPortal")', dataType: "json" },

Kendo-Knockout: Calling a method that changes viewmodel property from a template with data-binding inside a grid, breaks bindings

混江龙づ霸主 提交于 2019-12-01 11:52:51
I am using RPNiemeyer`s kendo-knockout library. I have a kendo grid with a kendo template in it. In the template there is a button which uses knockout click binding which calls a method that changes the viewModel. Steps to reproduce: Click the button in the grid. A method is called that changes the property of the viewModel and alerts the new value. Click the button again. The button is not working any more. Note: If You remove the line that changes the property of the viewmodel everything is working fine. Please explain the reason why this is not working and any ideas and solutions will be