kendo-ui

Difficulty with Kendo UI MVVM and an Associative Array

久未见 提交于 2020-01-15 12:16:10
问题 I am having a difficult time binding a view model using an "Associative Array" with Kendo UI's MVVM. I've attempted to amalgamate a demo together, but it is really hard to when I don't have even a half-working one to go off of. But this is the best I've managed... Here is my code, along with a jsBin to demonstrate. It just doesn't seem to like the idea of an associative array, and I'm not really certain how else to hook into it. The reason for the associative array is because I am pulling a

How do i check if the node is expanded in Kendo treeView

泪湿孤枕 提交于 2020-01-15 11:31:09
问题 I have a Kendo treeView. I want to collapse the node on single click (the default is on double click). To do that I need to know if the node is expanded already so I can call collapse(e.node). So, how do I check if the node has been expanded already? Thanks a lot 回答1: You can test with $(e.node).attr("data-expanded") === "true" or kendoTreeView._expanded(e.node) , however if your goal is to collapse/expand depending on the current state, you can simply call kendoTreeView.toggle(e.node); 来源:

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(); } },

Multiple filters in Kendo Combobox

匆匆过客 提交于 2020-01-15 07:06:07
问题 I have seen several examples where either the FilterType.StartsWith or FilterType.Contains is used as the filter. @(Html.Kendo().ComboBox().Name("kcombobox") .HtmlAttributes(new { style = "width:250px" }) .Placeholder("Select a value...") .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.StartsWith) .DataSource(source => { source.Read(read => { read.Action("GetCountries", "Home"); }).ServerFiltering(true); }) ) How to use multiple filters together. I want to filter the data

Kendo UI Web - DropDownList: select event doesn't return selected value properly

只谈情不闲聊 提交于 2020-01-15 07:05:53
问题 I am binding a DropDownList widget to select event like so: var items = [ { text: 'Item 3', value: '3' }, { text: 'Item 4', value: '4' } ]; var dropDownListEl = $('#dropdownlist'); dropDownListEl.kendoDropDownList({ dataTextField: 'text', dataValueField: 'value', index: 0 }); var kDropDownList = dropDownListEl.data('kendoDropDownList'), ds = kDropDownList.dataSource; items.forEach(function (item) { ds.add(item); }); kDropDownList.bind('select', function (e) { console.log('this.value(): ' +

Multiple filters in Kendo Combobox

人走茶凉 提交于 2020-01-15 07:05:04
问题 I have seen several examples where either the FilterType.StartsWith or FilterType.Contains is used as the filter. @(Html.Kendo().ComboBox().Name("kcombobox") .HtmlAttributes(new { style = "width:250px" }) .Placeholder("Select a value...") .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.StartsWith) .DataSource(source => { source.Read(read => { read.Action("GetCountries", "Home"); }).ServerFiltering(true); }) ) How to use multiple filters together. I want to filter the data

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

kendoValidator() causes “The field xxx must be a date” error when using DatePicker

本小妞迷上赌 提交于 2020-01-14 03:13:28
问题 Im my MVC5 application selecting date in "dd/MM/yyyy" format causes "The field xxx must be a date" error. On the other hand, if I comment kendoValidator() line as below the error has gone, but in that case I cannot perform client side validation and for this reason I want to use kendoValidator. Here are the code sections related to this control. Entity: [Required(ErrorMessage = "Required field")] [Display(Name = "Start Date")] public DateTime StartDate { get; set; } View: ... <script src="~

kendoValidator() causes “The field xxx must be a date” error when using DatePicker

喜欢而已 提交于 2020-01-14 03:13:21
问题 Im my MVC5 application selecting date in "dd/MM/yyyy" format causes "The field xxx must be a date" error. On the other hand, if I comment kendoValidator() line as below the error has gone, but in that case I cannot perform client side validation and for this reason I want to use kendoValidator. Here are the code sections related to this control. Entity: [Required(ErrorMessage = "Required field")] [Display(Name = "Start Date")] public DateTime StartDate { get; set; } View: ... <script src="~