kendo-ui

Combobox Cascading need more specific cascadeFrom option

只愿长相守 提交于 2019-11-30 14:39:05
I want to use the cascadeFrom feature of the Kendo UI ComboBox, but to my dismay it seems that that option will only accept an ID. Now I can't use the ID because the combobox is added dynamically and possibly multiple times resulting in multiple controls with the same ID. Does anyone have any ideas on how I can either pass a specific dom object to the cascade or how I could possibly setup a custom cascade feature using the 'change' event? That cascading functionality is just some sugar to make it easier create cascading DropDowns/Combos. Basically you need to use 4 things to manually implement

Kendo Grid scroll to selected row

旧时模样 提交于 2019-11-30 14:01:54
问题 I want to be able to call a function that scrolls the Kendo grid to the selected row. I´ve already tried some methods but none of them worked, for instance I tried this: var grid = $("#Grid").data("kendoGrid"), content = $(".k-grid-content"); content.scrollTop(grid.select()); I´ve also tried this: var gr = $("#Grid").data("kendoGrid"); var dataItem = gr.dataSource.view()[gr.select().closest("tr").index()]; var material = dataItem.id; var row = grid.tbody.find(">tr:not(.k-grouping-row)")

manually maintain dirty cell marker on paging in Kendo grid

烈酒焚心 提交于 2019-11-30 14:01:29
I have an editable Kendo grid where I can edit a cell and the grid adds the red mark to the upper left hand corner of the cell. I go to another page and then come back to the page where the edit took place and the red mark is gone but the newly added value in the cell remains. I saw a response to this on the Kendo site where it was advised that: "In order to show the "dirty flag" every time the grid is rebound it will have to iterate through all the model, check all fields if changed and visible in the grid cells. " I'm assuming this will need to be done on the DataBound() event of the grid

Change selected value of kendo ui dropdownlist

為{幸葍}努か 提交于 2019-11-30 12:26:18
问题 I have a kendo ui dropdownlist in my view: $("#Instrument").kendoDropDownList({ dataTextField: "symbol", dataValueField: "symbol", dataSource: data, index: 0 }); How can I change the selected value of it using jQuery? I tried: $("#Instrument").val(symbol); But it doesn't work as expected. 回答1: You have to use Kendo UI DropDownList select method (documentation in here). Basically you should: // get a reference to the dropdown list var dropdownlist = $("#Instrument").data("kendoDropDownList");

How Can I Hide Kendo UI Grid Columns using JavaScript, React, Angular, Vue or ASP.NET MVC

血红的双手。 提交于 2019-11-30 11:35:03
问题 I'm working on a HTML5 and JavaScript website. Is it possible to have a hidden column in Kendo UI Grid and access the value using JQuery? 回答1: Using JavaScript See the Kendo UI API reference. Hide a column during grid definition You can add hidden: true : $("#gridName").kendoGrid({ columns: [ { hidden: true, field: "id" }, { field: "name" } ], dataSource: [ { id: 1, name: "Jane Doe" }, { id: 2, name: "John Doe" } ] }); Hide a column by css selector $("#gridName").find("table th").eq(1).hide()

kendo grid delete command not working

陌路散爱 提交于 2019-11-30 11:29:47
i have developed a web application using kendo ui tools and theres a kendo grid with batch edit mode .. but when i press the delete button for any record in kendo grid it will erase from the list in grid but actually not in the data source.when i reload the page or grid the deleted item will still exist.. here is the code of my grid <div id="grid"> </div> <script type="text/javascript"> $("#submitMarketUser").click(function () { var grid = $("#grid").data("kendoGrid"); var dataSource = new kendo.data.DataSource({ transport: { read: { url: "WholeSaleTrade/GetTradeProductDetail", dataType: "json

Kendo Grid Foreign key column bind dynamically

北城余情 提交于 2019-11-30 10:19:08
@(Html.Kendo().Grid((IEnumerable<Doc.Web.Models.Common.ContactModel>)Model.contact_lst) .Name("grid") .Columns(columns => { columns.Bound(o => o.ContactID).Visible(false); columns.Bound(o => o.ContactName).Title("Contact Name"); columns.ForeignKey(p => p.CPOID, (System.Collections.IEnumerable)ViewData["CPOs"], "cpo_id", "contract_po") .Title("Company - Contact/Purchase Order"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(182); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Filterable()

Filtering source in a Kendo Template

不羁岁月 提交于 2019-11-30 10:00:34
问题 I have following Kendo template and MVVM binding. Source for this is template is viewModel that has employees inside it. The employees collection has 3 records in it. I need to display only those records for which the IsSelected property is true. <!----Kendo Templates--> <script id="row-template" type="text/x-kendo-template"> <tr> <td data-bind="text: name"></td> <td data-bind="text: age"></td> </tr> </script> employees: [ { name: "Lijo", age: "28", IsSelected: true }, { name: "Binu", age:

Exporting all data from Kendo Grid datasource

我的梦境 提交于 2019-11-30 10:00:28
I followed that tutorial about exporting Kendo Grid Data : http://www.kendoui.com/blogs/teamblog/posts/13-03-12/exporting_the_kendo_ui_grid_data_to_excel.aspx Now I´m trying to export all data (not only the showed page) ... How can I do that? I tried change the pagezise before get the data: grid.dataSource.pageSize(grid.dataSource.total()); But with that my actual grid refresh with new pageSize. Is that a way to query kendo datasource without refresh the grid? Thanks A better solution is to generate an Excel file from the real data, not from the dataSource. 1] In the html page, add $('#export'

Kendo Grid scroll to selected row

China☆狼群 提交于 2019-11-30 09:11:40
I want to be able to call a function that scrolls the Kendo grid to the selected row. I´ve already tried some methods but none of them worked, for instance I tried this: var grid = $("#Grid").data("kendoGrid"), content = $(".k-grid-content"); content.scrollTop(grid.select()); I´ve also tried this: var gr = $("#Grid").data("kendoGrid"); var dataItem = gr.dataSource.view()[gr.select().closest("tr").index()]; var material = dataItem.id; var row = grid.tbody.find(">tr:not(.k-grouping-row)").filter(function (i) { return (this.dataset.id == material); }); content.scrollTop(row); Can anyone point me