如何使用Excel下载功能在Kendo Grid中建立锚链接?

时间:2019-02-15 07:35:39

标签: kendo-ui kendo-grid

我有一个kendo Grid,我需要在其中添加锚链接,并且还希望具有一项功能,可以将kendo网格值(包括Header)下载到excel中。

1 个答案:

答案 0 :(得分:0)

$("#YourGridName").kendoGridExt({
                    toolbar: ["excel"],
                    excel: {
                        fileName: "Invoice Life Cycle Report.xlsx",
                        proxyURL: "@Url.Content("~/Plugin/Report/InvoiceAgingReport/GetInvoiceAgingReport")",
                        filterable: true
                    },
                    dataSource: reportData,
                    columns: [
                                {
                                    field: "Invoice_Number", title: "Invoice Number", width: "120px", template: '<a onclick = "return ShowDetailedAgingReport(' + "'#= Invoice_Number#'" + ',' + "'#= SBU#'" + ')" href="\\#">#= Invoice_Number#</a>'
                                },
                                {
                                    field: "SBU", title: "SBU", width: "120px"
                                },
                                {
                                    field: "ScanningDays", title: "Days to Scanning", width: "120px"
                                },
                                {
                                    field: "ScanningAndOracleDays", title: "Days between scanning & oracle entry", width: "120px"
                                },
                                {
                                    field: "OracleAndAccountingDays", title: "Days between oracle entry & accounting", width: "120px"
                                },`enter code here`
                                {
                                    field: "TOTAL", title: "Total travel Days", width: "150px"
                                }

                    ],
                    editable: {
                        mode: "popup",
                        title: "Invoice Life Cycle Detailed Report",
                        window: { draggable: false },
                    },
                    noRecords: {
                        template: "No data available."
                    },

                });