kendo-ui

How to change Kendo Grid Filter Format

匆匆过客 提交于 2019-12-03 16:21:05
I have a field in my grid that are IDs that range from 1 to 2000. I have it designated as a number in the field definition. The issue is when I use the filter and type in say "1000" when I return to the filter to put in another number it displays "1,000.00". I don't want the filtered text box to show the comma or decimal point. That format isn't relevant for this field. How do I correct this? Thanks in advance! While @Flores answer pointed me in the right direction, it did not do what was expected. At least I still had commas in my filter using his snippet. I ended up making a small

Kendo UI Grid: Select single cell, get back DataItem, and prevent specific cells from being selected?

a 夏天 提交于 2019-12-03 16:16:11
I've got a Kendo UI Grid displaying a set of data and I need to be able to select specific cells (cells in specific columns), and when selected, return the DataItem for the row the selected cell is in, and the property of that DataItem that was clicked on. I don't know if this is possible, but I've been working on it all day and have concluded that I need some help. Here's my grid and dataBound function, which currently gets me the DataItem, but that's it: var hhGrid = hhDiv.kendoGrid({ dataSource: housing, scrollable: false, sortable: true, selectable: 'cell', columns: [ { field: "Start",

Closing a kendoui window with custom Close button within the window

南楼画角 提交于 2019-12-03 15:59:24
问题 I'm using Kendo UI's window component, which is similar to any modal dialog. I have a close button in it, how do I close the window upon clicking that button (instead of clicking the default 'x' button in the title bar) The content in my window is loaded from another view @(Html.Kendo().Window() .Name("window") .Title("Role") .Content("loading...") .LoadContentFrom("Create", "RolesPermissions", Model.Role) .Modal(true) .Width(550) .Height(300) .Draggable() .Visible(false) ) In that same view,

Kendo Grid cancel edit event

可紊 提交于 2019-12-03 15:33:41
问题 I'm using the edit event on a Kendo grid to show a couple of hidden columns. I'll then hide them again on the save event. Problem I have is that there doesn't appear to be an event for cancelling edit mode, so the column get screwed up if the user clicks cancel. Is there an undocumented event for cancel or do I need to find a workaround? 回答1: Basically there is no such "Cancel" event, however you can attach click event on the "Cancel" button in the еdit event of the Grid. Please check the

adding jquery validation to kendo ui elements

╄→尐↘猪︶ㄣ 提交于 2019-12-03 15:33:05
I've looked at many posts on this and have it working to the extent that it does validate my fields when I add the following. $.validator.setDefaults({ ignore: [] }); The part I'm still missing is adding the input-validation-error class to notify the user. It is working fine for my other input elements (non-kendo). I've tried adding the class manually in $.validator.setDefaults as well but nothing seems to be working. Is there an example out there somewhere or has anyone gotten it to work? I'm not certain I'm doing this right but here's what I've tried to add it manually. $.validator

Kendo Grid: Canceling edit deletes new row

本秂侑毒 提交于 2019-12-03 14:20:21
Here is a demo to for the behavior I am experiencing. If you edit the existing row with id 1, change the text to something else and then press the cancel button, the row is reverted correctly to its previous state. In order to reproduce my problem you need to: Add a new row Press the update button to save it. Select the row again and press the update button. Press the cancel button The row disappears! Even though there are similar questions on this problem, I have yet to find a satisfactory answer. Some people say that I need to define an id. As you can see from my demo, this does not make any

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

How do I change the Background color of a Kendo UI for MVC grid cell

自作多情 提交于 2019-12-03 11:33:44
问题 I'm developing an app using Kendo UI for MVC and I want to be able to change the background of a cell but I don't know how to get the value of the column cell background property so I can set it. @(Html.Kendo().Grid(Model) .Name("LineItems") .Events(e=> e .DataBound("LineItems_Databound") ) .Columns(columns => { columns.Bound(o => o.Ui).Title("UI").Width(20); columns.Bound(o => o.QtyOrdered).Title("Qty Ord").Width(30); columns.Bound(o => o.Nomenclature).Width(200); columns.Bound(o => o

KendoUI Grid Decimal number column

折月煮酒 提交于 2019-12-03 11:17:09
问题 I have a column for weight (in Kg). When the user clicks on it I need to enable them to be able to put in decimal number with 3 places. The problem I have is at the moment it only allows them to put it in to 2 places, but shows as 3 places. You can type in a number to many decimal places but when it saves it will round it to 2 places. My column is set up like so: ... { field: "weight", title: "Weight", width: 40, format: "n4", decimals: 4, step: 0.001, template: "#= weight.toFixed(3)+'kg' #"

How can I refresh a grid data source using angular Kendo UI

心已入冬 提交于 2019-12-03 11:12:52
问题 I am combining Telerik Kendo grid with Angular using the Angular Kendo UI project. I have the following markup: <div kendo-grid="" k-options="thingsOptions" style="height: 600px;" /> and the following code in my controller: $scope.thingsOptions = { dataSource: { type: "json", transport: { read: "/OM/om/getAssets", dataType: "json" }, schema: { model: { id: "ProductID", ... This all works fine however I would like to force a data source refresh of my grid from my controller. something like