Kendo Grid:TypeError:$(...)。saveAsExcel不是函数

saveAsExcel不工作,并抛出error.Below是我的代码:

jquery文件包括:

Kenod Grid导出Excel

(Html.Kendo().Grid().Name(“grid”).NoRecords(“No Records Found(s)”).Excel(o => o.AllPages(true).FileName(“xyz.xls” )).Columns(columns => {columns.Bound(c => c.FirstName)。ClientTemplate(“#= FirstName#”).Width(150).Title(“First Name”); columns.Bound(c = > c.Email).Width(150).Filterable(false).Title(“Email”);; columns.Bound(c => c.Phone).Width(150).Filterable(false).Title(“Phone “);; columns.Bound(c => c.StateName).Width(150).Filterable(false).Title(”State“);; columns.Bound(c => c.Stars).Width(150) .Filterable(false).Title(“Stars”);; columns.Bound(c => c.ContactsProfiled).Width(150).Filterable(false).Title(“Contacts Profiled”);; columns.Bound(c => c.Leadsregistered).Width(150).Filterable(false).Title(“Leads Registered”);; columns.Bound(c => c.ContestWon).Width(150).Filterable(false).Title “ContestWon”);; columns.Bound(c => c.UserLastActivity).Width(150).Filterable(false).Title(“Last Activity”);; columns.Bound(c => c.CreatedOn).Width (150).Title(“Created On”)。格式(“{0:MM / dd / yyyy }“); }).ToolBar(toolBar => toolBar。Template(@)).Resizable(resizing => resizing.Columns(true)).Reorderable(reorder => reorder.Columns(true)).HtmlAttributes(new {style =“height :true).PreviousNext(true).ButtonCount(5):650px;“}).Scrollable(scrollable => scrollable.Virtual(true)).Sortable().Pageable(pageable => pageable.Refresh(true).PageSizes(true) ).DataSource(dataSource => dataSource .Ajax().Read(read => read.Action(“WealthWizard_Read”,“Dashboard”).Data(“GetFilter”)).PageSize(50)))

函数 $('#button')。click(function(){var gridview = $(“#grid”)。data(“kendoGrid”);

        gridview.saveAsExcel();


    });

确保你有适合kendo excel导出的javascriot文件的正确版本。 截至2014年Kendo UI Q3 2014(2014.3.1119)发布,Grid小部件提供了内置的Excel导出功能。

链接地址: http://www.djcxy.com/p/70443.html

上一篇: Kendo Grid :TypeError: $(...).saveAsExcel is not a function

下一篇: Kendo Grid MVC/ASP.Net Disable a field during edit