datagrid print and pagination

Gareth Williams 41 Reputation points
2020-01-03T19:22:04.487+00:00

Is there a way to make the datagrid only display whole rows?
It can sometimes, depending on row height, show a partial row at the bottom of the grid.
This is fine when on screen - you can scroll - but when I am rendering this for printing this is a problem.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Fay Wang - MSFT 5,191 Reputation points
    2020-01-06T02:49:30.107+00:00

    Hello,

    ​Welcome to Microsoft Q&A!

    There is no api can make the datagrid only display whole rows, it depends on the scrolling and row height. If you want to print dataGrid, you could use the PrintHelper class to print the DataGrid, but you still need to manually paging your data in code-behind. You can divide the long dataGrid to many small dataGrid and calculate the maximum number of dataGrid-Items that can display on the screen together and then put them into print-pages. Here is a similar thread, you can refer to it.


0 additional answers

Sort by: Most helpful