Print Datagrid
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I just want to print and I've got the code msdn http://msdn.microsoft.com/en-us/library/aa287528(VS.71).aspx[^]
private void button3_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)); InvokePaint(dataGridView1, myPaintArgs); }
When I clicked at button 3 ,I got just only page and nothing in side What's wrong with my code