DataGridViewPrinter Class
Please refer to the following url for more details on how to use the class: http://www.codeproject.com/csharp/datagridviewprinter.asp The Class Features: (1) The print style is almost the same as the style of the DataGridView control: (A) the same font style for the header and other rows, (B) the same foreground and background styles for the header and other rows, (C) the same alternating background style for the rows, (D) special font for certain rows will be considered, (E) special foreground and background styles for certain rows will be considered, (F) the same alignment for the columns. (2) Supports multiple pages. (3) The width of each column to be printed is calculated to fit all the cells (including the header cell). (4) The title at the top of the page can be specified. (5) The title font and color could be specified. (6) The title and the header row are repeated in each page. (7) The report could be top-centered (considering the top margin of the page) on the page or be aligned to the top-left margin. (8) The printing process ignores any invisible rows or columns (assuming that the user does not want them to appear). (9) If the DataGridView width is greater than the page width, then the columns with x coordinate greater than the page width will be printed into another page. This ensures that all columns will be printed (Thanks to Stephen Long). (10) Support page numbering. (11) The printing process uses Graphics.MeasureString to calculate the height and width for a certain text with a specified font. This ensures the preciseness of the printing. (12) The class supports Right-to-Left fonts.
AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Upload