I have a datagrid I want to print and I got it to print using the code below from MSDN. Except that the data in the datagrid prints really really tiny you cant make it out at all and the hole section of data starts at the top of the page and is over the darkend top border of the grid and goes down 2 cells and over one. Its reallly strange I dont know how to go about fixing this.
Hope someone can help, Thanks
|
private void btnPrintGrid_Click(object sender, EventArgs e)
{
printDocument1.Print();
}
private void printDocument1_PrintPage(System.Object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
PaintEventArgs myPaintArgs = new PaintEventArgs(e.Graphics, new Rectangle(new Point(0, 0), this.Size));
this.InvokePaint(DataGrid1, myPaintArgs);
}
|
|