Using the Designer with the Windows Forms DataGridView Control
Visual Studio provides designer support for the DataGridView control that enables you to perform many setup tasks without writing code. These tasks include binding the control to a data source, modifying the columns used to display data, and adjusting the appearance and basic behavior of the control.
In This Section
- How to: Add and Remove Columns in the Windows Forms DataGridView Control Using the Designer
Describes how to use the Add Columns and Edit Columns dialog boxes to populate and modify the columns collection.
- How to: Bind Data to the Windows Forms DataGridView Control Using the Designer
Describes how to use the Choose Data Source option on the control's smart tag to connect to data.
- How to: Change the Order of Columns in the Windows Forms DataGridView Control Using the Designer
Describes how to use the Edit Columns dialog box to rearrange columns.
- How to: Change the Type of a Windows Forms DataGridView Column Using the Designer
Describes how to use the Edit Columns dialog box to change column types.
- How to: Enable Column Reordering in the Windows Forms DataGridView Control Using the Designer
Describes how to use the control's smart tag to enable users to rearrange columns.
- How to: Freeze Columns in the Windows Forms DataGridView Control Using the Designer
Describes how to use the Edit Columns dialog box to prevent specific columns from scrolling.
- How to: Hide Columns in the Windows Forms DataGridView Control Using the Designer
Describes how to use the Edit Columns dialog box to hide specific columns.
- How to: Make Columns Read-Only in the Windows Forms DataGridView Control Using the Designer
Describes how to use the Edit Columns dialog box to prevent users from editing values in specific columns.
- How to: Prevent Row Addition and Deletion in the Windows Forms DataGridView Control Using the Designer
Describes how to use the control's smart tag to prevent users from adding or deleting rows.
- How to: Set Alternating Row Styles for the Windows Forms DataGridView Control Using the Designer
Describes how to use the CellStyle Builder dialog box to create a ledger-like appearance in the control.
- How to: Set Default Cell Styles and Data Formats for the Windows Forms DataGridView Control Using the Designer
Describes how to use the CellStyle Builder dialog box to set up the basic appearance and data-display formats for the control.
Reference
- DataGridView
Provides reference documentation for the DataGridView control.