Results 1 to 4 of 4

Thread: How to display a dataTable with the columns arranged vertically?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    How to display a dataTable with the columns arranged vertically?

    VB .NET 2005 question:

    I have a dataset with a datatable in it. This table has 44 columns. Using a DataGridView control to display this table takes the table beyond the width of an A4 sized paper (obviously).

    So, I want to display the columns arranged vertically, one column header below another, instead of column headers being next to each other. Can someone tell me how this can be achieved?

    I'm not very particular about using the DataGridView control. Any solution is OK. The objective is to print the data in the table.


    Thank You.

    Anjan

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to display a dataTable with the columns arranged vertically?

    The fact that the data is very wide in the grid has no bearing on how it will be printed. You can print it any way you want, regardless of how it's displayed in the UI.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Re: How to display a dataTable with the columns arranged vertically?

    I want at least one complete record on one sheet of paper. That can't be achieved if some columns have to be wrapped onto a new page.

    So, by having the column headers on the left hand side of the page, one below the other, I can get, 4 to 5 records(rows) on one sheet.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to display a dataTable with the columns arranged vertically?

    I repeat: you can print the data any way you want. How it's displayed in the grid has absolutely no bearing on how you print it. That is, unless you're just creating an image of the screen and printing that, which is a dodgy way to print.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width