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
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
Quote:
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.
Quote:
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.
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.