kendo-ui

kendo ui - why do button click refresh the page?

僤鯓⒐⒋嵵緔 提交于 2020-01-23 08:42:07
问题 Please find below my code: Template of customer search form <script type="text/x-kendoui-template" id="customer-search-view-template"> <div class="searchform" id="searchCustomer"> <form class="frmSearch"> <input name="searchTxt" data-bind="value: customerName" class="k-textbox" /> <button class="k-button" data-bind="click: searchClicked">Search</button> <button class="k-button" data-bind="click: newClicked">New</button> </form> </div> </script> customer-search.js where loading above template

Refresh after update Telerik Kendo Grid (MVC)

雨燕双飞 提交于 2020-01-23 02:07:06
问题 I have a Kendo Grid with some environments data. One of the fields of the grid is "isDefault" wich recieve 1 or 0 (for true or false). In the database I have a trigger that when some record is set to isDefault = 1 any other record is update to isDefault = 0, just to make sure there is only one default environment. The Kendo grid is working fine, it binds the data and updates the records just fine but after the update, the grid is not refreshing all the records and if there was, lets say,

Refresh after update Telerik Kendo Grid (MVC)

匆匆过客 提交于 2020-01-23 02:06:36
问题 I have a Kendo Grid with some environments data. One of the fields of the grid is "isDefault" wich recieve 1 or 0 (for true or false). In the database I have a trigger that when some record is set to isDefault = 1 any other record is update to isDefault = 0, just to make sure there is only one default environment. The Kendo grid is working fine, it binds the data and updates the records just fine but after the update, the grid is not refreshing all the records and if there was, lets say,

Retain expanded rows after databinding Kendo UI grid

拜拜、爱过 提交于 2020-01-22 16:49:48
问题 This is my first time working with Kendo UI. I have a Kendo UI grid with child nodes. I want to retain the expanded rows after databinding. Right now its getting collapsed after a row is added in the child I have tried suggestion from here dataBound: function() { this.expandRow(this.tbody.find("tr.k-master-row").first()); } But this expands the first row only. How to retain rows? What am I missing? Codepen 回答1: After a lot of playing around with your code example in CodePen, I believe I've

Retain expanded rows after databinding Kendo UI grid

我与影子孤独终老i 提交于 2020-01-22 16:49:25
问题 This is my first time working with Kendo UI. I have a Kendo UI grid with child nodes. I want to retain the expanded rows after databinding. Right now its getting collapsed after a row is added in the child I have tried suggestion from here dataBound: function() { this.expandRow(this.tbody.find("tr.k-master-row").first()); } But this expands the first row only. How to retain rows? What am I missing? Codepen 回答1: After a lot of playing around with your code example in CodePen, I believe I've

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

…衆ロ難τιáo~ 提交于 2020-01-22 15:11:45
问题 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({

Not understanding this kendo template that generates a checkbox in a grid

旧巷老猫 提交于 2020-01-21 12:15:17
问题 I'm not understanding something basic about Kendo templates, so maybe someone can explain this to me. This example of a template for a cell in a grid comes from Telerik sample code. template:"<input type='checkbox' #= IsAdmin ? checked='checked':'' # /> Ultimately, this produces an input tag which, if the value of IsAdmin is true, will include "checked='checked'" I don't understand the evaluation context of #= IsAdmin ? checked = 'checked' : '' # Documentation says that "#=" indicates "render

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 !==

Kendo ui scheduler - change date format

十年热恋 提交于 2020-01-17 05:46:12
问题 I'm able to change the format of the dates for a kendo ui scheduler on the column headers using the dateHeaderTemplate property but I need to change the format of the date highlighted in the image below: I'm sure there must be a pretty simple way of doing this but haven't found anything in the telerik docs so far. 回答1: Please try with the below code snippet. <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://kendo.cdn