kendo-grid

Customize the data in Kendo Grid pdf export

倾然丶 夕夏残阳落幕 提交于 2020-01-02 08:18:22
问题 I am using the built in functionality of Kendo Grid to export the grid data in pdf and excel http://demos.telerik.com/kendo-ui/grid/pdf-export. It is working fine for me. I want to customize the data that is exported i.e. add some additional columns and remove some of the columns of grid. Is there any way to customize the export data using templates or some other feature. Thanks in advance. 回答1: You have two options: Define a second grid with the columns that you want to export to PDF and

kendo UI grid dataitem set method

杀马特。学长 韩版系。学妹 提交于 2020-01-02 06:09:49
问题 grid.dataItem(selectedRow) this is return the selected row which is a kendo.data.ObservableObject. this object has all the columns for that grid's selected row. Is there a way to iterate thru all the columns and update. or do i have to do it like this: dataitem.set("Id", 1); dataitem.set("name", Eric); dataitem.set("age", 12); 回答1: As far as I understand what you are trying is to copy one JavaScript object into a Grid item, correct? Let's assume that you have the new value in val : var val =

kendo UI grid dataitem set method

帅比萌擦擦* 提交于 2020-01-02 06:07:26
问题 grid.dataItem(selectedRow) this is return the selected row which is a kendo.data.ObservableObject. this object has all the columns for that grid's selected row. Is there a way to iterate thru all the columns and update. or do i have to do it like this: dataitem.set("Id", 1); dataitem.set("name", Eric); dataitem.set("age", 12); 回答1: As far as I understand what you are trying is to copy one JavaScript object into a Grid item, correct? Let's assume that you have the new value in val : var val =

Kendo grid data export to a excel file

萝らか妹 提交于 2020-01-02 06:01:05
问题 I have configured the kendo grid and configured all the table rows and header.When I click export button it is generating an excel file.But where the problem occur I don't know with same configuration I have done in IE there instead of generating file it was showing the data format in URL with data:application/vnd.ms-excel,<table><tr><th>OrderID</th><th>Freight</th>..... var grid = $("#grid").kendoGrid({ dataSource: { type : "odata", transport : { read: "http://demos.kendoui.com/service

kendo ui grid filter, sort and paging in the server

时间秒杀一切 提交于 2020-01-02 03:51:08
问题 I'm using kendo grid and want to perform filtering, sorting and paging in the server. I understand that I should add to the dataSource: serverPaging: true, serverSorting: true But how do I tell the grid/dataSource which url it should use for the sortig, filtering etc. And what if I want to perform the sortig myself? I want to use the control kendo provides but to go to the server myself. Is there an event like "sortTriggered" where I can call "prevntDefault" or something like that... I don't

How to make scrollbar auto enabled or disabled in a Kendo grid?

╄→гoц情女王★ 提交于 2020-01-02 02:41:29
问题 This is my code for creating the grid: @{ if (Model.GenericEntityList.Count > 0) { @(Html.Kendo().Grid(Model.GenericEntityList).Name(screenNames.ToString()).Columns( columns => { columns.Bound(a => a.ID).Title("<input id='checkAll' type='checkbox' />").ClientTemplate("<input type='checkbox' id=#=genericCheckbox(ID,ViewFlag)#").Width(7); columns.Bound(a => a.Name).Title(screen.ToString() + " Name").Width(93); } ).Selectable().Scrollable().DataSource( datasource => datasource.Ajax().Read(read =

KendoUI grid filter date format

孤街浪徒 提交于 2020-01-02 01:56:23
问题 In my kendo grid I want to change the date format in filter Ex: 1/30/2015 to Jan 30, 2015 I already change the date format of Start Date field: "StartDate", title: "Start Date", width: 30, format: "{0:MMM dd, yyyy}", parseFormats: "{0:MM/dd/yyyy}", headerTemplate: '<label for="check-all"><b>Start Date</b></label>', headerAttributes: { style: "text-align: center;" }, attributes: { style: "text-align:center !important;padding-right: 25px;" } Code in my filterable filterable: { extra: false,

How to filter a Kendo UI MVC grid using a dropdown list

夙愿已清 提交于 2020-01-01 19:27:22
问题 I have a kendo grid that is filtered by pushing values from a dropdownlist into the built in kendo filters. I can search the grid using the same method when I type values in a textbox and search. This is my kendo grid and the dropdown @(Html.Kendo().DropDownListFor(model => model.MyObject.ID) .Name("Objects").DataTextField("Value").DataValueField("Key") .BindTo(@Model.MyObjectList).AutoBind(true) .HtmlAttributes(new { id = "selectedObject" }) <a class="button" onclick="searchGrid()" id=

How to filter a Kendo UI MVC grid using a dropdown list

落花浮王杯 提交于 2020-01-01 19:27:08
问题 I have a kendo grid that is filtered by pushing values from a dropdownlist into the built in kendo filters. I can search the grid using the same method when I type values in a textbox and search. This is my kendo grid and the dropdown @(Html.Kendo().DropDownListFor(model => model.MyObject.ID) .Name("Objects").DataTextField("Value").DataValueField("Key") .BindTo(@Model.MyObjectList).AutoBind(true) .HtmlAttributes(new { id = "selectedObject" }) <a class="button" onclick="searchGrid()" id=

Gray out a row in kendo grid based on column value

寵の児 提交于 2019-12-31 06:49:05
问题 I have a Kendo Grid whose values get populated based on a post call. I need to gray out an entire row if one of the column has a value "REGISTERED". Is there a way we can achieve this? 回答1: Add a handler function for the onDataBound event. In the onDataBound event handler, add jQuery that grey out column, something like this: function onDataBound(event) { // ... // Assumes your Kendo grid DOM element, or other appropriate element enclosing your disabled rows, is in the "el" variable el.find(