The table in the window is a very common form of data display, so the display of the interface is very important, through the use of many times to find The default display style of the C # WinForm DataGridView Control is very anti-human, but it's good to see a few simple property modifications in the visualization.
Here's a look at the DataGridView display of the default properties generated:
A very anti-human form.
Start by modifying the following properties that can be read by name (either through the VS Properties window or by manually modifying the DataGridView properties in the initialization code):
Allowusertoaddrows=false; // do not agree with the user to add rows, so that the last line of blank lines will not appear, most of the time the table is only used to display the data rather than the user input data (input data god horse in Excel more convenient bar) Backgroundcolor=white; // The background color is set to white, at least more than the default gray lot better Rowheadersvisible=false; // The outfit does not show, this is useful when you do not have to select a whole line of operation, because the display of the wardrobe is very counter-day
Now the effect:
Autosizecolumnsmode=fill; // the width of the list header is evenly distributed, filling the table space. This is a very critical step.
Final effect:
In my humble opinion, the purpose is to share and to record for future contingencies.
C # WinForm DataGridView Interface Design Tips