Tag Archives: print grid

Print values in a grid in C#

This example prints a set of values in a grid. The following DrawValueGrid method does all of the printing. It’s long but the pieces are relatively simple. // Draw a grid containing the indicated values. private void DrawValueGrid(Graphics gr, RectangleF … Continue reading

Posted in graphics, printing | Tagged , , , , , , , , , , | Leave a comment

Print a grid of values with alternating row colors in C#

The following code shows how the program prints its grid. The complete code isn’t too complicated but it’s long so here it’s broken into several methods. // Draw the grid. private void pdocGrid_PrintPage(object sender, PrintPageEventArgs e) { // Make some … Continue reading

Posted in graphics, printing | Tagged , , , , , , , , , , | 1 Comment

Print data in rows and columns in C#

This example shows how you can print data in rows and columns with column headers. The example uses the following code to initialize the data. // The sample data. private string[] Headers = {“Name”, “Street”, “City”, “State”, “Zip”}; private string[,] … Continue reading

Posted in graphics, printing | Tagged , , , , , , , , , , , , , , | 5 Comments