kendo-mvvm

kendo ui - why do button click refresh the page?

左心房为你撑大大i 提交于 2020-01-23 08:42:29
问题 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

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

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:

kendo ui form update cancel button

荒凉一梦 提交于 2019-12-25 07:30:04
问题 I am trying to a simple kendo ui form with 'Save' and 'Cancel' buttons. I am using the Kendo.Observable to bind the data to the form. The functionality I am trying to achieve is, if the 'Save' button is clicked, the form data will be saved. Else, if 'Cancel' is clicked the form will come back to read-only mode with the previous data that was present. To do this, I am first saving the model data in a 'originalvalue' property on click of Update button. If 'Cancel' is clicked, the 'fields' model

How to use URLs like '/update/:id' as KendoUI datasource?

不想你离开。 提交于 2019-12-23 18:04:25
问题 I read the documentation but found nothing related to setting parameters in dataSource urls. Is it possible to achieve that? Thx in advance. 回答1: Yes, it is possible. The url s defined in the DataSource.transport might be a function. This function receives (for update ) as first argument the data being updated (the model) and returns the string that should be used as URL. Composing the URL for what you want to do is: var ds = new kendo.data.DataSource({ transport: { read: { url: function () {

generate event on row button click and add icon? how to

隐身守侯 提交于 2019-12-23 03:07:39
问题 Here is my HTML code: <div id="grdCurrencies" data-selectable="true" data-role="grid" data-pageable=" true" data-sortable=" true" data-columns='[ { "field": "CurrencyCode", "width": 100 }, { "field": "CurrencyName", "width": 100 } , { field:"", template:"<i "class=" fa fa-trash-o grid-icon" data-bind="click: destroy"">del<"/"i>" , "width":40 }]' data-bind="source: dsProduct, events: {change: OnGridActiveRowChanged} " style=" height :500px;width:35%;"> </div> In the template field: <a >del<a>

Kendo MVVM Dropdown - How to set initial value based on other data?

ε祈祈猫儿з 提交于 2019-12-12 03:01:22
问题 I have the following html for a Kendo MVVM DropDownList: <select id="responseTypeDDL" data-role="dropdownlist" data-text-field="SystemResponseTypeCode" data-value-field="SystemResponseTypeId" data-bind="value: selectedSystemResponseTypeCode, source: responseTypes"> </select> This is my view model: SC.ViewModels.Reference.ResponseTypeDataSource.read(); var responseTypeDDL = kendo.observable({ responseTypes: SC.ViewModels.Reference.ResponseTypeDataSource, selectedSystemResponseTypeCode: null,

Using a kendo observable property in multiple viewModels

旧街凉风 提交于 2019-12-11 14:27:42
问题 In a Kendo app using the Kendo MVVM framework: I have a "global" viewModel which is information that is common to all parts of the app - e.g. the UserState, which has a property isLoggedIn. Many different Views and ViewModels access the userState object (from what I can see, 1 View is bound to 1 ViewModel in Kendo). For example, my home page might show the Login button if they are not authenticated. Then all the other screens behave differently once you are logged in, so each ViewModel needs

Binding event to other UI component's function, in Kendo MVVM

我怕爱的太早我们不能终老 提交于 2019-12-11 10:08:52
问题 In Kendo UI, what is the best practice to reference another UI element's (widget) functionality; the MVVM way? For example, let's say I have both a grid and a button. I want the button to trigger the AddRow function of the grid. For this, let's say I have the following html: <div id="grid" data-role="grid" /> <div id="button" data-bind="click: foo" /> My viewmodel would look something like: var viewmodel = kendo.observable({ foo: function() { // how to call the grid's functions here ideally,

bind a row data of kendo grid with text boxes onclick?

北城余情 提交于 2019-12-08 11:33:39
问题 Here is my html code , i have to send kendo gridrow data to textboxes onclicking inline edit button of kendo grid but i no want to edit inline. after editting through textboxes i want to show it in kendo grid as edited value <!--data-editable="inline"--> <div id="example"> <div id="kendoGrid" data-role="grid" data-pageable=" true" data-sortable=" true" data-filterable="true" data-toolbar="['create','save', 'cancel']" data-columns="[ { 'field': 'Id', 'width': 100 }, { 'field':