Gets or sets the data source that populates the selections for the combo boxes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The or Items properties specify where to retrieve the selection data shown in the combo box drop-down list. When using the property, if the data must be drawn from a nondefault property or column, then the DisplayMember property must be set to the name of the nondefault property or column.
Getting or setting this property gets or sets the DataSource property of the object returned by the CellTemplate property. Setting this property also sets the DataSource property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
The following code example demonstrates how to use a DataGridViewComboBoxColumn to aid in entering data into the TitleOfCourtesy column. The property is used to populate the combo box with a selection of titles. This example is part of a larger example available in the DataGridViewComboBoxColumn class overview topic.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.