Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Print a DataGridView

Print a DataGridView

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jordanwb
    wrote on last edited by
    #1

    In my program I have a DataGridView control on each TabPage in a TabPageControl, all DataGridViews have the same number and kind of columns. Now when the user clicks Print I want to amalgamate all the rows into one large DataGridView and print it. The first part is obvious but how would I print only the DataGridView?

    C 1 Reply Last reply
    0
    • J Jordanwb

      In my program I have a DataGridView control on each TabPage in a TabPageControl, all DataGridViews have the same number and kind of columns. Now when the user clicks Print I want to amalgamate all the rows into one large DataGridView and print it. The first part is obvious but how would I print only the DataGridView?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You wouldn't, b/c the control itself never shows all the records. You'd iterate over the record set and write seperate printing code to print it all.

      Christian Graus Driven to the arms of OSX by Vista.

      J 1 Reply Last reply
      0
      • C Christian Graus

        You wouldn't, b/c the control itself never shows all the records. You'd iterate over the record set and write seperate printing code to print it all.

        Christian Graus Driven to the arms of OSX by Vista.

        J Offline
        J Offline
        Jordanwb
        wrote on last edited by
        #3

        I see.

        D 1 Reply Last reply
        0
        • J Jordanwb

          I see.

          D Offline
          D Offline
          Duncan Edwards Jones
          wrote on last edited by
          #4

          If you start printing the second datagrid from the point on the page that the first one ends at, and so on, you should get effectively one printed grid.

          '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups