Gol*_*dar 4 grid export internet-explorer-9
我有问题在IE9中将Kendo UI Grid导出为excel和pdf.
Everythig使用Chrome工作正常,但在IE9中没有任何反应.
这是我的网格.有什么不对或丢失吗?
$("#gridDetalhes").kendoGrid({
dataSource: {
data: myJsonList
},
excel: {
allPages: true,
fileName: "SGD_Detalhes.xlsx"
},
toolbar: ["excel", "pdf"],
columns: [
{ field: "DataInicio", width: "135px", title: "Início", type: "date", template: '#= kendo.toString(DataInicio,"dd/MM/yyyy HH:mm:ss") #' },
{ field: "DataFim", width: "135px", title: "Fim", type: "date", template: '#= kendo.toString(DataFim,"dd/MM/yyyy HH:mm:ss") #' },
{ field: "Duracao", width: "80px", title: "Duração", type: "string" },
{ field: "Gerador", width: "40px", title: "A/M", type: "string" },
{ field: "Identificador", width: "120px", title: "Identificador", type: "string" },
]
});
Run Code Online (Sandbox Code Playgroud)
小智 8
导出功能不支持Safari,IE9及以下版本.对于不受支持的浏览器,您需要提供proxyUrl指定服务器代理URL.
请参阅服务器代理实现的示例(适用于ASP.NET WebForms/API/MVC,PHP,Java/Spring MVC)
例如 - ASP.NET MVC的服务器控制器操作:
public class HomeController
{
[HttpPost]
public ActionResult KendoSave(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
return File(fileContents, contentType, fileName);
}
}
Run Code Online (Sandbox Code Playgroud)
然后你需要提供指向这个动作的proxyUrl参数:
excel: {
allPages: true,
fileName: "SGD_Detalhes.xlsx"
proxyURL: "/Home/KendoSave",
}
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你.
| 归档时间: |
|
| 查看次数: |
4945 次 |
| 最近记录: |