TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Feroz Khan
1.4k
300
93.3k
how can i show some column from girdview to print preview
May 31 2016 6:19 AM
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
Reply
Answers (
1
)
calling text file
Feeding data to graph