kendo-grid

Cancel the update in inline kendo grid delete the row

戏子无情 提交于 2019-12-04 04:05:16
I am using two kendo inline grid parent and child. child grid contains the list of products,when user select the products(multiple selection) from child grid and clicked to save button,it's inserted into an parent grid. Child grid: var selectedIds = {}; var ctlGrid = $("#KendoWebDataGrid3"); ctlGrid.kendoGrid({ dataSource: { data:data1, schema: { model: { id: 'id', fields: { select: { type: "string", editable: false }, Qty: { editable: true, type: "number", validation: { min: 1, required: true } }, Unit: { editable: false, type: "string" }, StyleNumber: { editable: false, type: "string" },

Datetime filter in kendo grid

夙愿已清 提交于 2019-12-04 03:25:34
My code is in C# .NET I am using Kendo Grid version 2013.2.716.340 and server binding to show data in grid. In Kendo UI Grid, I have a dateTime column but the column filter input only has a date picker but no time picker. Due to this if I select the option IsEqualTo and give a date then I get zero results as the time is set to 00:00:00 in the filter but the columns have some time value. I want to add time picker along with date picker. I tried to do this on my column, but it didn't work: columns.Bound(o => o.Time).Title("Time").Format("{0:MM/dd/yyyy HH:mm:ss}").Filterable(f => f.UI(

Controlling Group order in a Kendo UI Grid

这一生的挚爱 提交于 2019-12-04 03:08:42
问题 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 回答1: 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

How to set Kendo UI grid column widths programmatically

时间秒杀一切 提交于 2019-12-04 02:44:41
I would like to set Kendo UI grid column widths programmatically. I am using the following code: function setColumnWidths(grid, options) { for (var i = 0; i < options.columns.length; i++) { grid.columns[i].width = options.columns[i].width; } } When debugging in chrome after the statements executed, grid.columns[i].width seems to be appropriately set to the new value, however nothing changes in the GUI, the column widths remain the same. What am I missing? You need to change grid's width through its element instead of its definition. Kendo grid contains header and content, so you need to change

LINQ to Entities - Addressing class properties with their string names

一曲冷凌霜 提交于 2019-12-04 02:39:11
问题 I have a Kendo grid that has serverside filtering turned on. The field to filter by is passed as a string. For example, I want to filter by "SampleId". Now, I need to write a LINQ to Entities query that can filter by using the strongly-typed property SampleId. For example: db.Cases.Where(x=>targetlist.Contains(x.SampleId)) where targetlist is a list of items from the filter. So, in effect, is there a way to write a query such that "SampleId" can directly translate to Case.SampleId? I have

Can Kendo Grid be always in edit mode?

前提是你 提交于 2019-12-04 02:14:24
Does anyone know if the kendo grid could be always set to edit mode at all times? We don't want the user to click on a cell or a button to activate the edit mode. We want it the widgets to be displayed and available at all times. Is it possible at all? Apart from using batch editing mode you can try setting the template of every column and binding the input elements to the data items using MVVM. $("#grid").kendoGrid({ dataSource: { schema: { model: { id: "id", fields: { id: { editable: false } } } } data: [ { id:1, age: 30, name: "John Doe" } ] }, columns: [ { field: "id", width: 50 }, { field

How to remove all rows from a Kendo grid

南笙酒味 提交于 2019-12-03 22:17:44
I am using Kendo grid . I want to remove all rows from Kendo grid using JavaScript . I removed them using a for loop but I want to find the best way to remove all rows. try following code. $("#Grid").data('kendoGrid').dataSource.data([]); for demo click here That doesn't really move the underlying data of the grid, it just clears the rows being displayed. If you sort the "empty" grid, all the rows reappear form the underlying data. If instead of removing your data as shown like this: dataSource.data([]); and instead replace it with a new array of data, say called result.Data.. like this:

Kendo UI Grid select by data item

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 21:24:11
I have a Kendo UI Grid with a large datasource and paging. I have an event that fires where I know the underlying data item that I want to select, but am unsure on how to programatically page/select this item in the grid. If the item is not on the current grid page, I cannot use datasource.view() to poke through when the data is not on the current page. Does anyone know how I can select an item by its underlying data source object? I've got a similar situation to where i am at @: http://jsfiddle.net/Sbb5Z/1050/ I can get the data item with the following: change: function (e) { var selectedRows

How to update Kendo Grid row from window

♀尐吖头ヾ 提交于 2019-12-03 18:03:53
问题 The set-up: ASP MVC project Kendo Grid in a view via Razor Column custom command, calls... JavaScript that opens Kendo window with refresh() URL to partial view as custom form The form has an input type=button calling JavaScript The barrier: How to update the row (dataItem?) of Grid with new model (from window/form javascript). I am unable to get a handle to target dataItem. Select() is not applicable here because the row is not selected. Instead, a custom button event opens modal Grid Window

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