- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试使用 excel 导出创建剑道网格。我的数据完全按照我的意愿显示,并且网格工作正常。但是,saveAsExcel 函数触发了 excelExport 事件,但没有创建文件。 pdf 导出也有同样的问题。这是我的网格选项:
grid = $("#grid").kendoGrid({
toolbar:["excel","pdf"],
height: 500,
scrollable: true,
groupable: true,
sortable: true,
filterable: false,
excel: {
allPages:true,
filterable:true
},
excelExport: function(e) {
console.log('Firing Export');
console.log(e.workbook);
console.log(e.data);
},
pdfExport: function(e){
console.log('PDF export');
},
columns: [
{ field: "date", title: "Time", template: "#= kendo.toString(kendo.parseDate(date), 'MM/dd/yyyy') #", width: '120px'},
{ field: "customer", title: "Customer" },
{ field: "amount", title: "Total", format: "{0:c}", width: '70px', aggregates: ["sum"]},
{ field: "paid_with", title: "Payment", width: '130px'},
{ field: "source", title: "Source" },
{ field: "sale_location", title: "Sale Location" }
]
}).data("kendoGrid");
只要数据的搜索参数发生变化,就会调用此 ajax。我在哪里刷新数据源。
$.ajax({
'url':'/POS/ajax/loadTransactionsDetailsForDay.php',
'data':{
filters
},
'type':'GET',
'dataType':'json',
'success':function(response) {
var dataSource = new kendo.data.DataSource({
data: response.data.invoices,
pageSize: 100000,
schema: {
model: {
fields: {
date: {type: "string"},
customer: { type: "string" },
amount: { type: "number" },
paid_with: {type: "string"},
source: {type:"string"},
sale_location: {type:"string" }
}
}
}
});
grid.setDataSource(dataSource);
grid.refresh();
}
});
我的控制台日志的输出是。
Firing Export.
一个工作表对象。
Object {sheets: Array[1]}sheets: Array[1]0: Objectlength: 1__proto__: Array[0]__proto__: Object
and and array with these objects for every row in the grid:
0: o
_events: Object
_handlers: Object
amount: 40.45
customer: "customer 1"
date: "2015-11-25T00:00:00-08:00"
dirty: false
employee: 23
paid_with: "Check"
parent: ()
sale_location: "Main"
source: "POS"
uid: "70b2ba9c-15f7-4ac3-bea5-f1f2e3c800d3"
我有最新版本的剑道,我正在加载 jszip。我在最新版本的 chrome 上运行它。我已经尝试了我能想到的这段代码的各种变体,包括删除我的模式,每次在回调中重新初始化剑道。
有人知道为什么这行不通吗?
我能找到的每个例子都让它看起来非常简单,只需创建网格并调用导出...所以我必须忽略一些东西。
我很感激对此的任何想法。
谢谢。
最佳答案
可能是因为缺少文件名。
这里添加了文件名的部分:
excel: {
allPages:true,
filterable:true,
fileName: "Kendo UI Grid Export.xlsx"
},
你可以在这里看看:Grid Excel Export
这里是 pdf:Grid Pdf Export
关于javascript - Kendo UI 网格导出 excel 和 pdf 导出,没有创建文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35209252/
我发现运行良好的代码片段可以轻松创建模块化 Delphi 应用程序。此代码适用于 Delphi 5 版本。 链接到片段 -> http://delphi.cjcsoft.net/viewthread.
我正在通过下面的代码以编程方式创建搜索索引。问题是插入设计文档后如何建立索引?或者它是第一次由 .search() 方法使用构建? var book_indexer = function(doc) {
我有一个非常小的项目,我想创建一个设置表单。做这个的最好方式是什么?简单地创建另一个带有复选框/文本框的 Windows 窗体并使用 Properties.Settings 类保存这些设置?它可能会起
我试图通过引用已经存在的 dm-linear、dm-snapshot、dm-cache 等来实现设备映射器目标。在我的实现中,我需要对某个扇区范围执行读/修改/写操作。由于设备映射器直接与块层对话,我
现在我有了一些空闲时间,我决定创建一个 Java 程序来将我的 XBee(即 zigbee)芯片连接到我的新 SmartThings 集线器。我找到了一个很好的教程,通过手动创建数据包来完成此操作(
我有一系列这种形式的静态实用方法: StringBuffer Util.doA(String arg0, String arg1, SomeEnum e); StringBuffer Util.do
我有一个 d3dDevice: ComPtrd3dDevice; 我在这里将它用于 dxgiDevice: ComPtr dxgiDevice2; HRESULT hr; hr
如何仅使用 css(样式)为我的 react-native View 组件背景创建此设计? 我希望 View 2 具有绿色背景,顶部有一条小曲线,与右上角的中心相交。 仅使用 borderRadius
我正在尝试创建一个有点动态的 html 类,它根据类末尾包含的数字设置宽度 %。注意:类名将始终以“gallery-item-”开头 示例:div.gallery-item-20 = 20% 宽度 我
基本上,我想要创 build 备方向值 alpha、beta 和 gamma 的可视化表示。到目前为止,我已经设法使用 innerHTML 以纯文本形式显示值,但我想为每个值创建一系列“条形图”。我根
我想用 Java 创 build 计二维码。 设计二维码可能包含图形形式的 Logo 。下面是此类设计代码的示例。 如何创建这样的二维码? 最佳答案 我刚刚找到了一个可以创建此类 QR 码的软件。 T
据我了解,SyncResponse 的有效负载是一个 Device 类型的数组。 我的问题是我无法创建在 SyncResponse - Payload - Device 内部定义的设备类型实例(无权访
我现在正在考虑如何创建类似以下事实的 android 应用程序... 起始页是 gridview,显示的列数将基于在设备屏幕分辨率上 当我点击 gridview 上的一项时,以下屏幕将根据设备分辨率显
我正在开发设备 onwer 应用程序,其中我必须使用 NFC 作为设备所有者安装我的应用程序,但是当我触摸两个设备并尝试安装应用程序时出现错误“由于校验和错误无法安装管理应用程序” 请告诉我哪里做错了
如何在不使用 mknod 或 MAKEDEV 的情况下(即通过使用动态注册)创 build 备文件。 最佳答案 假设你想在插入时动态分配一个主设备号给一个字符设备,使用: int alloc_chrd
我正在使用 .NET 为 IE 开发工具栏。目前,我使用 gacutil 插入我的 .NET 程序集,并使用 regasm 注册我的 COM 程序集。 我想为项目创建一个设置 (MSI),但我似乎无法
在为设置页面创建 Activity 后,我注意到 if (mCurrentValue !== value) 中的 mCurrentValue !== value 返回警告: Identity equa
我正在为用 C# 开发的软件开发设置表单。我正在研究不同的软件如何实现它们的设置表单。 在我遇到的大多数情况下,他们似乎在表单的左 Pane 中使用 Treeview,在右 Pane 中使用配置设置。
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 4 年前。 Improv
我正在尝试从 NodeJS 后端创建文档 ( https://firebase.google.com/docs/cloud-messaging/js/device-group ) 中所述的设备组,但我
我是一名优秀的程序员,十分优秀!