Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how can i show some column from girdview to print preview
Feroz Khan
May 31 2016 6:19 AM
194
Reply
Please see below my code.. and find attached file. also..
private void MISPrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Bitmap bm = new Bitmap(this.datagridView2.Width, this.datagridView2.Height);
datagridView2.DrawToBitmap(bm, new System.Drawing.Rectangle(0, 0, this.datagridView2.Width, this.datagridView2.Height));
e.Graphics.DrawImage(bm, 0, 520);
}
private void Print_Priview_btn_Click(object sender, EventArgs e)
{
MISPrintDocument.PrinterSettings.Copies = 1;
MISPrintPreviewDialog.Document = MISPrintDocument;
MISPrintPreviewDialog.ShowDialog();
}
Attachment:
gridveiw.rar
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
calling text file
Feeding data to graph