DataGridView Common Properties in C#winform

Source: Internet
Author: User

1.Allowusertoaddrows Property: Indicates whether the option to add rows to the user is displayed

Allowusertoordercolumns property: Indicates whether the column is allowed to be relocated by hand

Allowusertoresizecolumns property: Indicates whether the user can resize the column

Allowusertoresizerows property: Indicates whether the user can resize the row

2.columnheadersvisible Property: Indicates whether column header rows are displayed

rowheadersvisible Property: Indicates whether the column containing the row header is displayed

3.ReadOnly Property: Indicates whether the user can edit the cells of the DataGridView control

Enabled property: Indicates whether the control is enabled and whether the control can respond to user interaction

4.autoSizeColumnsMode Properties: Determining the Auto-sizing mode for visible columns

autoSizeRowsMode Property: Determines the automatic sizing mode for visible rows

5.DefaultCellStyle Properties: Default style of cell ( alignment , foreground color , back color , font , etc.)

 Columnheadersdefaultcellstyle Property: Default style for column headings

 Rowsdefaultcellstyle Property: Default style for row cells

Rowtemplate.defaultcellstyle Properties: Default cell style for a row template

Alternatingrowsdefaultcellstyle Property: Default cell style for odd rows

6.MultiSelect Properties: Indicates whether the user is allowed to select multiple cells, rows, or columns of DataGridView at a time

SelectionMode property: Indicates how to select cells for DataGridView

7.Standardtab Property: Indicates whether pressing the TAB key moves the focus to the next control in the tab order, instead of moving the focus to the next cell in the control

8.BackgroundColor properties: Gets and sets the background color of the DataGridView

BorderStyle property: Gets and sets the border style of the DataGridView

Cellborderstyle property: Gets and sets the border style of a cell

Gridcolor Property: Gets and sets the color of the grid line

ScrollBars property: The type of scroll bar to display in the DataGridView control

9.DataSource properties: Gets or sets the data source for the data displayed by the DataGridView

 DataMember Property: Indicates the sub-list of DataSource to display in the DataGridView control

DataGridView Common Properties in C#winform

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.