Hello,
I'm using a Grid control with virtual scrolling. When I export to PDF, the content runs right off of the bottom of the page without breaking to a new page.
I have my datasource's page size set to 100 records to limit the number of times the grid will need to fetch new data from the server. If I change this to only 5 records, for example, then the PDF will create a page break after 5 records. However, I am also using grouping on the data. If every row is in its own group, I can get about 6 or 7 rows onto a page. If every row falls under the same group, I can get about 13-15 rows onto a page. Because the number of rows per page may vary, I can't resort to setting the page size on the datasource.
My main concern at the moment is getting automatic page breaking to work. In the screenshot I've attached, you can see that there is still some data at the very bottom of the page that is cut off. There should be 11 rows of data, across 6 groups, but only 9 rows manage to fit onto the page. Relevant code below:
.Pdf(pdf => pdf
.FileName("BidAwards.pdf")
.AllPages()
.PaperSize("A4")
.Landscape()
.AvoidLinks()
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(100)
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(col => col.BidId))
.Read(read => read.Action("BidAwardGridData", "Reports", Model))
.Group(groups => groups.Add(col => col.GroupValue))
)
I'd also like to find a way to keep entire groups of rows on a page if possible. In other words, if the whole group won't fit on the remainder of the page, break to a new page for that group.
Unfortunately, for the time being I'm stuck on an older version of the Telerik controls, and can't easily update until after this development cycle is completed (unless it's necessary to fix this).
Thanks!!!