This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Microsoft Logo
Gray Pipe
Developer Network Developer Network Developer
Sign in

Subscriber portal

Get tools
  • Downloads
    • Visual Studio
    • SDKs
    • Trial software
      • Free downloads
      • Office resources
      • SharePoint Server 2013 resources
      • SQL Server 2014 Express resources
      • Windows Server 2012 resources
  • Programs
    • Subscriptions
      • Overview
      • Administrators
    • Students
      • Microsoft Imagine
      • Microsoft Student Partners
    • ISV
    • Startups
    • Events
  • Community
    • Magazine
    • Forums
    • Blogs
    • Channel 9
  • Documentation
    • APIs and reference
    • Dev centers
    • Samples
    • Retired content
search clear
We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second.
System.Windows Namespaces System.Windows.Forms DataGridView Class
DataGridView Class DataGridView Constructor
DataGridView Constructor
DataGridView Constructor
DataGridView Methods
DataGridView Properties
DataGridView Events
DataGridView Constructor
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.
This documentation is archived and is not being maintained.

DataGridView Constructor ()

.NET Framework (current version)
Other Versions
  • Visual Studio 2010
  • .NET Framework 4
  • Visual Studio 2008
  • .NET Framework 3.5
  • .NET Framework 3.0
  • .NET Framework 2.0
 

Initializes a new instance of the DataGridView class.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

Syntax

C#
C++
F#
VB
Copy
Public Sub New

Remarks

The following table shows initial property values for an instance of the DataGridView class.

Property

Initial Value

AllowUserToAddRows

true

AllowUserToDeleteRows

true

AllowUserToOrderColumns

false

AllowUserToResizeColumns

true

AllowUserToResizeRows

true

AutoGenerateColumns

true

AutoSizeColumnsMode

None

AutoSizeRowsMode

None

ClipboardCopyMode

EnableWithAutoHeaderText

ColumnHeadersHeightSizeMode

EnableResizing

ColumnHeadersVisible

true

EditMode

EditOnKeystrokeOrF2

MultiSelect

true

ReadOnly

false

RowHeadersVisible

true

RowHeadersWidthSizeMode

EnableResizing

SelectionMode

RowHeaderSelect

Version Information

.NET Framework
Available since 2.0

See Also

DataGridView Class
System.Windows.Forms Namespace
DataGridView Control (Windows Forms)

Return to top
Show:
Print Export (0)
Print Share
IN THIS ARTICLE
    Is this page helpful?
    Additional feedback?
    1500 characters remaining
    Thank you! We appreciate your feedback.

    Dev centers

    • Windows
    • Office
    • Visual Studio
    • Microsoft Azure
    • More...

    Learning resources

    • Microsoft Virtual Academy
    • Channel 9
    • MSDN Magazine

    Community

    • Forums
    • Blogs
    • Codeplex

    Support

    • Self support

    Programs

    • BizSpark (for startups)
    • Microsoft Imagine (for students)
    United States (English)
    • Newsletter
    • Privacy & cookies
    • Terms of use
    • Trademarks
    logo © 2017 Microsoft
    © 2017 Microsoft