Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3597480
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:07:28+00:00 2026-05-18T20:07:28+00:00

I am developing a program, and I need to print the Bills data that

  • 0

I am developing a program, and I need to print the Bills data that is displayed in a DataGridView control.
I want to know the code how to print the data in the DataGridView.

I am using Visual Studio 2008 and C# 3.5

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:07:28+00:00Added an answer on May 18, 2026 at 8:07 pm

    There isn’t any printing support built into the DataGridView, so you’ll have to implement this yourself. There are a couple of possible solutions:

    1. WinForms does provide a standard printing system, which you can harness to print out the contents of your DataGridView control. You’ll want to use the PrintDocument class, so the relevant documentation is a great place to start reading. The advantage of this method is that it allows you complete control over the format and layout of the printed document.

    2. You could export the data from your DataGridView to Microsoft Excel, and then print it from there. Excel has much more robust, built-in printing support.

    3. If you’re not interested in rolling your own solution, you can browse CodeProject for some already designed solutions. For example:

      • The DataGridViewPrinter Class
      • Printing a DataGridView on DotNet Framework
      • Another DataGridView Printer
      • DataGridView Printing by Selecting Columns and Rows

      Even if you don’t find a drop-in solution that fits your exact needs, you can probably get a good idea of how to go about creating this functionality yourself by using the published code as an example.

    4. If you’re up for a really hacky solution (and you don’t have any desire or need to customize the layout or design of the printed output), you could use the DrawToBitmap method exposed by every control. This is a really quick-and-dirty approach that draws an exact image of the DataGridView control as it appears on your screen to a Bitmap, which you can then pass directly to your printer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a program, and I need to print the Bills data that
I am developing a program by using JFrame and i want to realize that
I'm developing a program that would require huge amount of memory, and I want
I'm developing a program in C# and need a mutable variable that is available
I have a C program that I'm developing using Ubuntu 11.10 (Linux version 3.0.0-12-generic-pae
I'm developing some code that is simulating network equipment. I need to run several
I'm developing a control program for a Quadrocopter (AR Drone) under C# I want
I developing a program like Word. For that I need to write strings into
I am developing a bison program and need to have a last option that
im developing a program in which I need to make a save file that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.