kendo-grid

Kendo DropDownList in Grid shows value after selection

梦想与她 提交于 2020-01-21 08:02:45
问题 I'm trying to use a drop-down list in my grid. This is my grid definition: $("#grid").kendoGrid({ editable: true, dataSource: { data: data, schema: { model: { fields: { Name: { type: "string", editable: false }, FruitName: { type: "string" }, FruitID: { type: "number" } } } } }, columns: [{ field: "Name", title: "Name", width: 150 }, { field: "Fruit", title: "Fruit", width: 115, editor: renderDropDown, template: "#=FruitName#" }] }); And this is my editor function: function renderDropDown

Kendo UI grid conditionally editable cell

我与影子孤独终老i 提交于 2020-01-17 12:27:09
问题 I am trying to do conditionally editable cells in kendo by writing code: edit: function (e) { var kendoTextBox = e.container.find("input[name=Ordertype]")[0]; if (kendoTextBox) kendoTextBox.enable(e.model.RequestAmount == 0); }, The ordertype column should be editable when RequestAmount column is 0, but is not. Can someone tell me where am I wrong? 回答1: Try this edit: function (e) { var kendoTextBox = e.container.find("input[name=Ordertype]")[0]; if (kendoTextBox && e.model.RequestAmount !==

how to create row rapidly - Telerik Kendo UI MVC grid pop-up mode

感情迁移 提交于 2020-01-16 15:46:14
问题 I have a grid similiar that. But I don't want to close pop-up window; after clicking update button, i want to save record and clear all (or some) fields and continue to create (other) new record. So user can re-insert new record rapidly (multiple insert in the same window). Finally user click the "cancel" (or close) button and popup will be closed. How can I do that. 回答1: Subscribe to Grid Edit/Save javascript events and follow the example below var _PreventWindowClose = false; var

Not able to refresh the data grid after selecting the column dynamically

僤鯓⒐⒋嵵緔 提交于 2020-01-16 00:52:33
问题 I am just started with kendo UI grids, And I could able to make out how to integrate the kendo with angularJS. But I was trying to implement some thing like dynamically adding/selecting or unselecting the column names, then the data grid should display the columns accordingly in the data table. Ex: Now when I selecting a new column in the right side of the grid, The datatable is updated with that selected column Hope this image gives a clear idea on what I am pointing So, I want to achieve

filter kendo ui grid with filed type object

≯℡__Kan透↙ 提交于 2020-01-15 09:29:08
问题 I have this grid $("#address-grid").kendoGrid({ dataSource: { transport: { read: { url: "operations/get_sales_reps_addresses.php?salesRepsId=" + salesRepsId, type: "GET" }, update: { url: "operations/edit_address.php?salesRepsId=" + salesRepsId, type: "POST", complete: function (e) { $("#address-grid").data("kendoGrid").dataSource.read(); } }, destroy: { url: "operations/delete_address.php", type: "POST", complete: function (e) { $("address-grid").data("kendoGrid").dataSource.read(); } },

Kendo Grid datasource refresh does not work in IE

ⅰ亾dé卋堺 提交于 2020-01-14 12:53:05
问题 I was trying to refresh my kendo grid after doing an update of the data by using the following piece of code in the success handler of my ajax call: $("#grid").data("kendoGrid").dataSource.read(); $("#grid").data("kendoGrid").refresh(); Well this refreshes and works perfectly as expected in Mozilla and Chrome but in IE the refresh does not seem to work nor does the datasource update. Do I need to make any particular modifications in my code to get it working in Internet Explorer as well? PS:

How to format date in Angular Kendo Grid

删除回忆录丶 提交于 2020-01-14 12:35:47
问题 I working on Angular Kendo Grid and I am getting server data in format 1900-01-01T00:00:00 But I want it to display in standard format, not sure how to do it. I have applied format='{0:MM/dd/yyyy h:mm a}' in grid column but no effect. What ever data format conversion to do, I need to do at client side of code i.e server date to javascript format!! <kendo-grid-column field="mydata.openDate" width="220" title="Open Date" filter="date" format='{0:MM/dd/yyyy h:mm a}'> </kendo-grid-column> 回答1:

Kendo Grid is not returning dataItem in the event “onchange” of grid

丶灬走出姿态 提交于 2020-01-14 04:35:06
问题 My Kendo grid has inline editing, and data is bound through ajax. I have tried different options like: 1) var grid = $("#Grid").data("kendoGrid"); var row = $(this).closest("tr"); var rowIdx = $("tr", grid.tbody).index(row); var item =grid.dataItem(row) 2) var row = $(this).closest("tr"); var grid = $("#Grid").data("kendoGrid"); var item = grid.dataItem(row); 3) var selectedItem = this.dataItem(this.select()); -- I can't use this because my client does not want single click selection or

How to add a template to a Kendo grid toolbar

拥有回忆 提交于 2020-01-13 19:01:08
问题 I am trying to add a custom template to Kendo MVC grid. My template should contain 2 things Create button to add new record to the grid Autocomplete box to filter the data in the grid. I am trying the following code : .ToolBar(toolbar => { toolbar.Template(@<text> <div class="toolbar"> <label class="category-label" for="category">Filter by name:</label> @(Html.Kendo().AutoComplete() .Name("employees") .DataTextField("empName") .Filter("contains") .MinLength(3) .Events(e => e.Change(

Kendo UI Grid Filtering column with multiple values

半世苍凉 提交于 2020-01-13 18:12:53
问题 I have been using filters to successfully search on my KendoUI grids. However a new application has some fields that are multi-valued and my filtering doesn't work - it actually just seems to spin forever. An example of a multi-value field: field : "rspPersons", title : "Responsible Persons", type : "Text", template: "# var t=rspPersons.join(', ');data.tagsString=t; # #=t #" An example of my filter: orfilter.filters.push( { field : "chgDescription", operator : "contains", value : v1 },