I want export information from a Grid mvc to PDF without the tool bar but with the Client FooterTemplate, because, I have the total amount about all rows here
this is mi full code
<link href="~/Content/kendo/2016.1.112/kendo.common-material.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2016.1.112/kendo.material.min.css" rel="stylesheet" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
<script src="~/Scripts/kendo/2016.1.112/jquery.min.js"></script>
<script src="~/Scripts/kendo/2016.1.112/kendo.all.min.js"></script>
<script src="~/Scripts/kendo/2016.1.112/kendo.aspnetmvc.min.js"></script>
<style>
#grid .k-grid-content {
height: 283px !important;
}
#grid > div.k-grid-footer > div > table > tbody > tr > td:nth-child(6) {
text-align: right;
}
#grid > div.k-grid-footer > div > table > tbody > tr > td:nth-child(7) {
text-align: right;
}
/*
Use the DejaVu Sans font for display and embedding in the PDF file.
The standard PDF fonts have no support for Unicode characters.
*/
.k-grid {
font-family: "DejaVu Sans", "Arial", sans-serif;
}
/* Hide the Grid header during export */
/*.k-pdf-export .k-grid-toolbar,
.k-pdf-export .k-pager-wrap*/
.k-pdf-export .k-grid-toolbar
{
display: none;
}
</style>
@{
Layout = null;
}
<div id="transactions">
@(Html.Kendo().Grid<Account.ViewModels.AccountManagement.AccountingViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.CompanyName);
columns.Bound(p => p.ContractDescription);
columns.Bound(p => p.ConceptType);
columns.Bound(p => p.MovementDate).Title("Date").Format("{0:MMMM dd yyyy}");
columns.Bound(p => p.Billing).Title("Invoice Number");
columns.Bound(p => p.PaidFlag).Title("Status").ClientFooterTemplate("Total");
columns.Bound(p => p.Paid).Title("Amount").Format("{0:c}").HtmlAttributes(new { style = "text-align:right" })
.ClientFooterTemplate("#= kendo.format('{0:c}', sum) #");
})
.ToolBar(tools =>
{
tools.Excel();
tools.Pdf();
})
.Excel(excel => excel.FileName("Transaction.xlsx").Filterable(true).ProxyURL(Url.Action("ExcelExportTransactions", "Accounting")))
.Pdf(pdf=>pdf.AllPages()
.FileName("Transactions.pdf")
.Margin(0,1,100,1)
.ProxyURL(Url.Action("PdfExportTransactions", "Accounting")))
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Sort(sort => sort.Add("CompanyName").Ascending())
.ServerOperation(true)
.Model(model => model.Id(p => p.MovementID))
.Read(read => read.Action("ReadTransactions", "Accounting"))
.Aggregates(a => { a.Add(p => p.Paid).Sum(); })
)
)
</div>