kendo-grid

How to use Kendo UI Grid with ToDataSourceResult(), IQueryable<T>, ViewModel and AutoMapper?

我的未来我决定 提交于 2019-12-02 19:34:02
What is the best approach to load/filter/order a Kendo grid with the following classes: Domain: public class Car { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual bool IsActive { get; set; } } ViewModel public class CarViewModel { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual string IsActiveText { get; set; } } AutoMapper Mapper.CreateMap<Car, CarViewModel>() .ForMember(dest => dest.IsActiveText, src => src.MapFrom(m => m.IsActive ? "Yes" : "No")); IQueryable var domainList = RepositoryFactory

Kendo UI Window overlay opacity

核能气质少年 提交于 2019-12-02 18:33:10
问题 How can I set overlay opacity with CSS. I tried .k-overlay { opacity:0.9; } but it wont work. Can anyone help me? here I provide a simple demo 回答1: .k-widget would be a too broad selection. You can set the opacity for that very window once the window will be shown: <script> function onOpen() { setTimeout(function(){ $("#dialog").parent().css("opacity", 0.2); }, 10); } $("#dialog").kendoWindow({ modal: true, open: onOpen }); </script> 回答2: You could try .k-overlay { opacity:0.9 !important; }

Kendo UI grid rowTemplate - calling a function to affect the css of td cells

痴心易碎 提交于 2019-12-02 18:26:22
问题 My Kendo UI grid is dynamic, where the columns can be defined as field0 , field1 through field[n] ; I do NOT know the number of fields ahead of time. I would like to use the rowTemplate in order to apply css background-color to the <td> cell. Further details: Each cell value must be sent to a ratio function (i.e. the financial risk exposure divided by a benchmark value). The result of that ratio determines the background-color property from that cell). I'm starting with this code snippet, and

Custom sort function kendo grid

一世执手 提交于 2019-12-02 17:28:27
问题 Can anyone please let me know how can we write our own function in javascript for sorting in kendo grid. And do we need to write two functions for asc and desc? Any help.. greatly appreciated! 回答1: You can do it and you don't have to write two different function for ascending and descending since the only thing that you need to do is providing a compare function for the column field that you need a special algorithm. Example: Lets assume that we want to sort a grid by name (a string ) and

Why kendo Ui -grid date is not sorting properly?

▼魔方 西西 提交于 2019-12-02 16:53:36
问题 value is ReinsDepositAmount ** output ** i have recently stucked with one of the application date sorting in kendo ui grid. In kendo grid , the column name is define like this Incoming value to ReinsDepositDate - Month,date,year format. 08-23-1991 Field name is ReinsDepositDate: { field: "ReinsDepositDate", type: "date", title: "Due Date",format: "{0:M/d/yyyy}", width: 100, filterable: { cell: { operator: "contains" } } }, When Sorting the date , its sorting based on first values 1/12/1994 23

ag-grid vs slick-grid vs angular-grid which is better? [closed]

烈酒焚心 提交于 2019-12-02 15:37:21
Recently we thought to change our current grid tool. Currently we're using kendo-ui for grid and all. After searching we came with 3 results. But, still we're not sure which is better and why in future run. While using kendo we missed having control over it. It would be a great if any one can help us out on choosing right grid with angularjs . Niall Crosby Disclosure: I'm the founder and CEO of ag-Grid. First, some clarification on the question, ag-Grid used to be called angular-grid, however I presume you meant angular-ui-grid (or simply ui-grid), so allow me to answer ag-grid vs slick-grid

Reloading kendo ui grid the row item code executes an error

安稳与你 提交于 2019-12-02 14:37:55
问题 I've a web application with kendo ui grid. The grid is load with Bakbone.js when I click a button and I can remove a row with the next code: $(document).on("click", "#grid tbody tr .ob-delete", function (e) { var item = grid.dataItem($(this).closest("tr")); var check = confirm("Do I delete:" + item.City ); if (check) { grid.removeRow($(this).closest("tr")); } }); The cofiguration of the button to delete: command: [ "edit", { name: "destroy", text: "Remove", className: "ob-delete" }] When I

Disable/Enable the checkbox in kendo grid based on column Value

℡╲_俬逩灬. 提交于 2019-12-02 12:23:36
I have a kendogrid all working good, now I got new requirement i.e. last column i have checkbox and just to that previous column I have a status column, if that text value is "CERTIFIED" only then that specific row checkbox should be enabled, if the text is not 'CERTIFIED' it should disable the checkbox of that row,and should not allow to check that checkbox using jquery, I have attached pic of kendogrid I have, which might help for any suggestions CODE THESE ARE MY COLUMNS OF MY KENDO GRID , columns: [ { field: "ResultFormatID", Title: "ResultFormatID", filterable: false, sortable: false,

Remove HTML from Excel generated from Kendo Grid

心已入冬 提交于 2019-12-02 12:22:36
I'm using the following code to load grid data and for removing the HTML from the footer and group footer in Excel. I'm using the recommended code only but somehow it's not working and there is no change in result as well. var GridParams = function(fromDate, toDate) { var groupSortDirection = groupByPaymentDate.value(); return { id: divReportGrid, showGroup: true, serverSorting: false, url: formUrls.gridUrl, columns: columns(), pageSize: 50, showReport: true, fileName: "Report.xlsx", toolbar: ["excel"], ExcelExport: function(e) { var rows = e.workbook.sheets[0].rows; for (var ri = 0; ri < rows

Kendo Grid: how to update data source from code when the row changes

偶尔善良 提交于 2019-12-02 12:19:41
问题 this follows on from a few of my previous posts, regarding updating the kendo grid datasource. The last thing I want to do is have this occur when the user goes to a new row (thanks to @Lars so far for much impressive help) I am doing this by detecting a row change ( happen to be doing this in a directive), and calling back into the grids controller where I call the sych function on the data source... vm.rowChangedCallback = function () { console.log("calling vm.gridData.sync"); // Calling