I am trying to do a simple Export to Excel but when I add the Export snippet to the grid I get the "Excel export is not supported in server binding mode." message.
I am actually pulling a list of Active Directory users from a custom Object. The Grid works perfect. All I want to do is because to export the list to an Excel Spreadsheet.
My Controller code, that returns my list
public ActionResult GisUsersTL()
{
var ADList = this.GetGisUsers("GISUsers");
ViewData["ADList"] = ADList; //Testing Telerik option to bind data
return View("GISUsersTL", ADList);
}
RAZOR page that bombs
@model IEnumerable<GISPortal.Models.ADGisUsers>
@using GISPortal.Controllers
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
@(Html.Kendo().Grid((IEnumerable<GISPortal.Models.ADGisUsers>)ViewData["ADList"])
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Username);
columns.Bound(p => p.DisplayName);
columns.Bound(p => p.Department);
columns.Bound(p => p.Office);
columns.Bound(p => p.JobTitle);
columns.Bound(p => p.MobilePhoneNumber);
columns.Bound(p => p.EmailAddress);
})
.Pageable() //Enable paging.
.ToolBar(tools => tools.Excel()) //This is the line that bombs so I can't even add any more custom export lines.
)