WinForm Datagridview.autosizecolumnsmode Properties

Source: Internet
Author: User
WinForm control DataGridView. autoSizeColumnsMode Property

Change the AutoSizeMode of the DataGridView column


Allcells adjusts the column width to fit the contents of all the cells in the column, including the header cell.
Allcellsexceptheader adjusts the column width to fit the contents of all cells in the column, excluding header cells.
ColumnHeader adjusts the column width to fit the contents of the column header cell.
Displayedcells adjusts the column width to fit the contents of all the cells in the column that are displayed on the current screen, including the header cell.
Displayedcellsexceptheader adjusts the column width to fit the contents of all the cells in the column of the row displayed on the current screen, excluding header cells.
Fill adjusts the column width so that the width of all columns fills the display area of the control exactly, and only horizontal scrolling is required to ensure that the column width is above the Datagridviewcolumn.minimumwidth property value. The relative column width is determined by the relative Datagridviewcolumn.fillweight property value.
None The column width is not automatically adjusted.
The resizing behavior of the NotSet column is inherited from the Datagridview.autosizecolumnsmode property.

WinForm Datagridview.autosizecolumnsmode Properties

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.