Compartilhar via


Customizing the Windows Forms DataGridView Control

The DataGridView control provides several properties that you can use to adjust the appearance and basic behavior (look and feel) of its cells, rows, and columns. If you have special needs that go beyond the capabilities of the DataGridViewCellStyle class, however, you can also implement owner drawing for the control or extend its capabilities by creating custom cells, columns, and rows.

To paint cells and rows yourself, you can handle various DataGridView painting events. To modify existing functionality or provide new functionality, you can create your own types derived from the existing DataGridViewCell, DataGridViewColumn, and DataGridViewRow types. You can also provide new editing capabilities by creating derived types that display a control of your choosing when a cell is in edit mode.

In This Section

Reference

  • DataGridView
    Provides reference documentation for the DataGridView control.
  • DataGridViewCell
    Provides reference documentation for the DataGridViewCell class.
  • DataGridViewRow
    Provides reference documentation for the DataGridViewRow class.

See Also

Concepts

Column Types in the Windows Forms DataGridView Control

Other Resources

DataGridView Control (Windows Forms)