Printing a GridView that is longer than one page.
-
I am trying to print a GridView. Everything is fine for, say, 5 records. But when the number of records makes the grid view longer than the page then the trouble starts. It will still try and print the correct number of pages (in the case of 50 records, 2 pages), but all pages are blank except for when the first - where about 25 records will be displayed. It truncates the rest of the records. This happens in both FF and IE. Does anyone have any ideas? thanks.
-
I am trying to print a GridView. Everything is fine for, say, 5 records. But when the number of records makes the grid view longer than the page then the trouble starts. It will still try and print the correct number of pages (in the case of 50 records, 2 pages), but all pages are blank except for when the first - where about 25 records will be displayed. It truncates the rest of the records. This happens in both FF and IE. Does anyone have any ideas? thanks.
Check this out: http://www.codeproject.com/KB/custom-controls/GridViewPrinting.aspx
We are not a Code Charity
-
I am trying to print a GridView. Everything is fine for, say, 5 records. But when the number of records makes the grid view longer than the page then the trouble starts. It will still try and print the correct number of pages (in the case of 50 records, 2 pages), but all pages are blank except for when the first - where about 25 records will be displayed. It truncates the rest of the records. This happens in both FF and IE. Does anyone have any ideas? thanks.
The real problem was due to this construction:
<asp:Panel ... > <asp:GridView ...> ... </asp:GridView> </asp:Panel>
The properties that were causing problems were in the Panel:overflow
andscrollbars
. Settting overflow tovisible
and scrollbars tonone
fixed my problems. *happy*