I have a multiple band WinGrid which displays a bill of material. This includes part numbers, descriptions, etc. I would like to print out an index page of all parent band part numbers with the grid printout, which will list the part numbers and the page they printed out on. Is this possible? If so, an example would be great!
jhammer80 said:Is there any way to control the number of rows per page?
There's no built-in way to do that. You might be able to acheive something like this by breaking up your data into separate grids. You could create a hidden grid and copy the data source and the layout from the on-screen grid. Then hide all but the first x rows, print it, hide all but the next x rows, print that, etc. The down side of this is that each page would end up being a separate print job.
Is there any way to control the number of rows per page? This functionality is something my users will not do without. Exporting then printing seems like too much overhead for what is being acheived. All thoughts are appreciated. By the way, I am using the UltraGridPrintDocument control to print the grid.
Hi,
I don't think there is any way to do this. The grid will not actually know what got printed on which page until after the printing is completed. So I suppose in theory the grid could track this information and return it to you in some form after the printing is done and you could use that information to print an extra page as a separate print job.
But none of that functionality currently exists in the grid. It might be possible to do this using the UltraGridDocumentExporter. I know it has a built-in indexing capability. But I haven't used it myself, so I'm not sure how it works. I think you basically add the Index into the document and then you insert markers or bookmarks into the document at the points you need and then it fixes them up at the end. So you might be able to achieve what you need by exporting the grid to a document, like a PDF report, and then printing that.