kendo-ui

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:

Selecting/actioning items in Kendo UI widgets using Excel VBA

戏子无情 提交于 2019-12-03 21:30:47
Stuck - Need help ! I'm trying to automate actioning items in an IE web page on our internal company site. I'm able to fill out any kind of text object , click on a submit button etc., but several items are either in a grid/table (Kendo Grid) or a dropdown list. I just can't seem to figure out how to select from these grids/tables or dropdowns. I've tried everything I can think of, to no avail. I've used getElementById() , getElementsByTagName() , getElementsByName() , and even some web scraping techniques. Unfortunately, as the web page is on an internal site, no one else will be able to test

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

Knockout-Kendo Grid with batch editing doesn't update the viewmodel

混江龙づ霸主 提交于 2019-12-03 21:03:10
I don't know what is wrong with my implementation but I can't get my viewmodel updated if I'm using editable KendoUI Grid with Knockout-Kendo. If I change some particular table field and log the viewmodel it will not get any update. <button data-bind="click: log">Log ViewModel</button> <div id="gr" data-bind="kendoGrid: options"></div> var pStyleHeader_ViewModel = function() { this.options = { data: ko.observableArray([{ StyleNo : ko.observable("1BA0012"), Description : ko.observable(""), StyleType : ko.observable("10"), DueDate : ko.observable(new Date("2012-10-31T00:00:00+02:00"))}]),

Kendo widgets two level deep in Razor, inline markup blocks cannot be nested

懵懂的女人 提交于 2019-12-03 20:54:06
问题 I´m trying to implement Kendo widgets two level deep but the Razor engine keeps complaining: "Inline markup blocks (@Content) cannot be nested. Only one level of inline markup is allowed." Is there a way for the Razor engine to render helpers two level deep? My code example: @(Html.Kendo().TabStrip() .Name("tabStrip") .Items(tabstrip => { tabstrip.Add().Text("Strip1") .Selected(true) .Content(@<text> @RenderPanelBar() </text>); tabstrip.Add().Text("Strip2") .Content(@<text> </text>); }) )

Kendo grid: How to check all checkboxes of selected rows?

十年热恋 提交于 2019-12-03 20:49:26
I am using the Telerik Kendo grid with MVC and C#. I have a grid, populated with some data and have added a checkbox column - used so that the user can select all. Now, when I check the "selectAll" checkbox, all checkboxes are checked (one for each row), as they should be. What I want to do: I want to be able to double-click on a row and have the chechbox check change - if it is unchecked, a dbl-click will check it and visa versa. Also, as the Kendo grid allows the user to select many (mousedown, drag and mouseup - like when selecting icons on the desktop), I'd like to have it so that when the

How to send data to the controller from the Kendo UI TreeView

不问归期 提交于 2019-12-03 20:48:23
I have two TreeViews, one has a list of countries, and the other is empty, now I want drag and drop selected countries into the second tree-view. I don't know how to send data to the controller from the TreeView and there is also some text field on the page in a form. So, how can I send both the form data and the TreeView's data to the controller. Here is the code for the second tree-view which is empty and I want to add the selected nodes to: @(Html.Kendo().TreeView() .Name("treeview-right") .DragAndDrop(true) .Events(events => events .Drag("onDrag") .Drop("onDrop") ) ) Please try with the

Kendo Multiselect value setting Bug

廉价感情. 提交于 2019-12-03 19:09:50
I having this weird problem with kendo multiselect. <input id="addTags" /><br> <input type="button" onclick="fillaList();" value="fill List" /> <input type="button" onclick="clearList();" value="Init List" /> var list=[{label:'tag1', value:'1'}, {label:'tag9', value:'9'}, {label:'tag8', value:'8'}, {label:'tag7', value:'7'}, {label:'tag6', value:'6'}, {label:'tag5', value:'5'}, {label:'tag4', value:'4'}, {label:'tag3', value:'3'}, {label:'tag2', value:'2'}]; function fillData(tagIds){ var tagObj = $("#addTags").data("kendoMultiSelect"); if (tagObj == undefined) { // if not loaded $("#addTags")

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

Kendo Ui DataSource Add Function not working properly

我的梦境 提交于 2019-12-03 17:17:41
I defined a Kendo Data Source as below. It is populating values in a ListView. var datasourceAppList = new kendo.data.DataSource({ transport: { create: function(options){ //alert(options.data.desc); alert(options.data.desc); var localData = JSON.parse(localStorage.getItem("LsAppList")); localData.push(options.data); localStorage.setItem("LsAppList", JSON.stringify(localData)); //localStorage["LsAppList"] = JSON.stringify(localData); options.success(localData); }, read: function(options){ var localData = JSON.parse(localStorage["LsAppList"]); options.success(localData); }, update: function