Results 1 to 3 of 3

Thread: Datagridview header colour, paging and printing

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Datagridview header colour, paging and printing

    HI,

    Is it possible to have some colour in the headers of the datagridview pls. I cant see any in the properties?


    Also how can I make some buttons to be able to switch between all the contents of the datagridview, it needs multi pages.


    I need to know how to print them also.


    Many thanks guys
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Datagridview header colour, paging and printing

    Quote Originally Posted by angelica
    HI,

    Is it possible to have some colour in the headers of the datagridview pls. I cant see any in the properties?
    You can use gridview column's HeaderCell.Style property Check this

    Also how can I make some buttons to be able to switch between all the contents of the datagridview, it needs multi pages.
    I doubt if this is possible directly,though you can use same logic as that of ASP.NET's Custom Paging.

    I need to know how to print them also.
    May be you can use reporting tool or generate CSV file out of gridview's data.
    __________________
    Rate the posts that helped you

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

    Re: Datagridview header colour, paging and printing

    You can't change the colour of the DGV headers without turning visual styles off, for which there is a property.

    The DGV supports a virtual mode that allows paging.

    Merrion has posted code in the VB.NET CodeBank forum to print the contents of DataGrid and DataGridView controls.
    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