Reputation: 302
I am using Kendu mvc grid in my mvc application using razor view. I have to enable Export to Excel feature of kendu mvc grid. I saw demo of Export to Excel on telerik. I applied the same code from there in my .cshtml but Export is not working. here is my grid code for Export to Excel
.Excel(excel => excel
.FileName("Kendo UI Grid Export.xlsx")
.Filterable(true)
.ProxyURL(Url.Action("Quotes_Save", "Admin")))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Quotes_Read", "Admin"))
))
public ActionResult Quotes_Read()
{
//return Json(GetAllQuotes().ToDataSourceResult(request));
return Json(new { success = true }, JsonRequestBehavior.AllowGet);
}
[HttpPost]
public ActionResult Quotes_Save(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
return File(fileContents, contentType, fileName);
}
No ActionResult from both of these called.. This is version of kendo mvc that i am using 2014.3.1316.545 Any help?
Upvotes: 0
Views: 959
Reputation: 4497
Have you included the jszip link into your page:
<script src="@Url.Content("~/Scripts/kendo/2014.3.xxx/jszip.min.js")"></script>
obviously putting your version of the kendo suite you have installed.
Upvotes: 1