I have a grid that will typically have anywhere between 50 to 400 rows. I figured out to export the grid to a one page pdf, however 100+ rows on a 1 page (Letter) pdf is unusable. How do I export to a multi-page pdf, or is that not an option?
If I specify PaperSize("Letter") I get a pdf with the top left section of the grid with the rest of the content simply cut-off. The PDF export functionality sounds really usefull, but unless I figure out how to do multiple-page exports, the possible uses will be extremely limited. Am I missing something?
@(Html.Kendo().Grid(Model)
.Name(
"grid"
)
.Columns(c =>
{
c.Bound(m => m.ExternalID).Title(
"ID"
);
c.Bound(m => m.LocalID).Title(
"Local ID"
);
c.Bound(m => m.GroupDate).Format(
"{0:d}"
).Title(
"Date"
)
.ClientGroupHeaderTemplate(
"Date: #= kendo.toString(value, 'd') # <button onclick='selectGridGroup(this);' class='btn btn-danger btn-sm'>Delete Items</button>"
);
c.Bound(m => m.SubmitDate).Format(
"{0:d}"
);
c.Bound(m => m.SettlementDate).Format(
"{0:d}"
).Title(
"Settle Date"
);
c.Bound(m => m.FirstName);
c.Bound(m => m.LastName);
c.Bound(m => m.Company);
c.Bound(m => m.SettlementAmount).Format(
"{0:C}"
).Title(
"Amount"
)
.ClientGroupFooterTemplate(
"Sub-Total: #= kendo.toString(sum, 'C') #"
)
.ClientFooterTemplate(
"Total: #= kendo.toString(sum, 'C') #"
);
c.Bound(m => m.AdjustmentAmount).Format(
"{0:C}"
).Title(
"Adjustments"
)
.ClientGroupFooterTemplate(
"Sub-Total: #= kendo.toString(sum, 'C') #"
)
.ClientFooterTemplate(
"Total: #= kendo.toString(sum, 'C') #"
);
c.Bound(m => m.InvoiceNumber);
c.Bound(m => m.Description);
c.Bound(m => m.TransactionStatus);
c.Bound(m => m.Matched);.
c.Command(m => m.Destroy()).Hidden();
})
.Groupable()
.ToolBar(t => t.Pdf())
.Pdf(p => p
.AllPages()
.Landscape()
.PaperSize(
"Letter"
)
.Title(@ViewBag.Title)
.FileName(@ViewBag.Title +
".pdf"
)
)
.DataSource(d => d.Ajax()
.ServerOperation(
false
)
.PageSize(30)
.Model(m => m.Id(i => i.Id))
.Aggregates(a =>
{
a.Add(s => s.SettlementAmount).Sum();
a.Add(s => s.AdjustmentAmount).Sum();
})
.Group(g => g.Add(a => a.GroupDate))
.Destroy(r => r.Action(
"RemoveTransaction"
,
"Report"
))))