kendo-ui

Unique array by object property

放肆的年华 提交于 2019-12-11 22:28:10
问题 How do I make an array of objects unique based on a property? In this instance, "field": 0: Object field: "name" operator: "eq" value: "d" 1: Object field: "gridSearch" operator: "contains" value: "1" 2: Object field: "gridSearch" operator: "contains" value: "12" For reference here is the bit of code I'm using where this problem is concerned: $('#gridSearch').keyup(function() { var currentFilters = $('.k-grid').data("kendoGrid").dataSource.filter(); currentFilters.filters.push({ field:

In MVC ,Html Kendo Grid is not passing “&” to the controller from view through Datasource

只谈情不闲聊 提交于 2019-12-11 21:51:32
问题 Kendo grid datasource is not passing values "&" from view to controller in MVC For instance from the below code if testIdVal value is "Interface Class & Function" . Only "Interface Class" are being passed to the controller . .DataSource(Function(d) d.Ajax() _ .Read(Function(read) read.Action("GetResourcesForRolesForRootDomain", "Inquiry", New With {.testId= "#=testIdVal#"}).Type(HttpVerbs.Post).Data("additionalData"))) _ 回答1: Two ideas on that one: Try to add encodeURIComponent around

Kendo grid sort by nullable property

我的未来我决定 提交于 2019-12-11 20:47:02
问题 I am using a html helper for Kendo grid to display some data. The model used by the grid has a DateTime nullable property and I want to display the items in grid sorted descending by myDateTime property, with the null values first. I've managed to display them ordered descending, but the null values are displayed last. Any ideas how could I display the null values first and then the descending sorted values? @(Html.Kendo().Grid<MyVm>() .Name("myGrid") .Columns(columns => { columns.Bound(m =>

Kendo UI treeview current datasource post

送分小仙女□ 提交于 2019-12-11 20:34:35
问题 I need to create a folder structure in FTP similar to that of the tree structure on my view. I want to allow the user to edit the tree structure before creating folders. I have a TreeView with server binding: @model IEnumerable<TreeViewItemModel> @(Html.Kendo().TreeView() .Name("PipelineStructureMajor") .BindTo(Model) .ExpandAll(true) .DragAndDrop(true) ) The binding is fine. With some client-side restructuring (appending/dragging/removing some nodes), I want to post the treeview (root node

KendoGrid Disable or Enable (edit, add or delete button) base (true or false in )

跟風遠走 提交于 2019-12-11 20:28:55
问题 I want to disable or enable the button (k-grid-edit, k-grid-add, k-grid-delete) in Kendo Grid base a value (true or false) get from controller (viewbag or viewdata). That value are got from a function in action base usertype.... 回答1: columns.Command(command => command.Destroy()) .HtmlAttributes( new { @class = (bool)ViewBag.Disabled ? "k-state-disabled" : "k-state-default"}) Note: You amy have to manually detach the click event of individual buttons for this css trick. Following would be

Unable to Customize Kendo Calendar Month templates with Knockout Kendo JS Binding

て烟熏妆下的殇ゞ 提交于 2019-12-11 20:24:27
问题 I have customized the Kendo Calendar Month Template Reference found Here with out knockout-kendo.js . Official Kendo Reference from Here. The problem is when i use the below code in knockout-kendo.js binding its not getting compiled . Take a look at this Knockout-kendo.js with Calendar at fiddle. If i remove the month view template code , its working. How do i resolve this with knockout-kendo.js? $("#calendar").kendoCalendar({ dates: birthdays, month: { // template for dates in month view

Kendo Grid Modifying remote data before inserting into grid

我的未来我决定 提交于 2019-12-11 20:00:48
问题 I have a view model set up like this $(function () { data = { id: "", blah: null, blah2: null }; vM = kendo.observable({ arrData: [], DisplayThisArr: [], /* * Functions you see are here */ }); // End vM kendo.bind($("#grid"), vM); }); I bind it to a view that looks like this <!DOCTYPE html> <html> <head> <!-- Imports here, including the vM.js file --> </head> <body> <div id="container"> <!-- Set up the Grid --> <div id="grid" data-role="grid" data-column-menu="true" data-filterable="true"

Pass variable from kendo datasource to template

假如想象 提交于 2019-12-11 19:32:39
问题 I am trying to pass a string from the kendo datasource, into a template within the grid, that is acting as the Print button. The button fires a function that opens a new link to the report server, and I need to pass a string value into the function, so that string value is then sent in the url. I have it working if I send the datasource Id field, but if I try to send a string value (Physician), I get an 'Unexpected identifier' error. I have tried changing the coluns: field: to Physician, but

Kendo DataSource Transport.Destroy with function got called too much

断了今生、忘了曾经 提交于 2019-12-11 19:26:50
问题 I've got a strange problem using transport.destroy: I have a Listview with a swipe event to open the delete option. (like most apps) i did implement this: http://demos.kendoui.com/mobile/listview/editing.html#/ in my app. everything work fine, except destroy am listview item will be called for X+1 (x = deleted items) At first deletion it will be called once, at the 2nd time it will be called twice and so on. Here is the JSBin: http://jsbin.com/AGAGUfE/11/ You can see it within the console for

Restrict multiple checks in kendo grid

烂漫一生 提交于 2019-12-11 19:19:08
问题 I have a kendo grid, with checkboxes as a column. I want to restrict multiple checks on this. i.e. User must be able to check only one row, not more than 1. Please help me on this. Edit: The checkboxes are generated using clientTemplate. I have bounded the column with the grid. columns.Bound(p => p.FlightNo).HeaderTemplate(" ") .ClientTemplate("<input id='checkbox' name='chbox' class='chkbxq' type='checkbox' />").Sortable(false).Filterable(false).Width(50); Thanks Manikandan 回答1: Checkboxes