---
title: Basic Formatting and Styling in DataGridView Control
ms.date: "03/30/2017"
helpviewer_keywords: 
  - "DataGridView control [Windows Forms], formatting and styling"
  - "data grids [Windows Forms], formatting"
ms.assetid: b9b90836-1f56-4aa9-8db8-edc78fe830e8
---
# Basic Formatting and Styling in the Windows Forms DataGridView Control
The `DataGridView` control makes it easy to define the basic appearance of cells and the display formatting of cell values. You can define appearance and formatting styles for individual cells, for cells in specific columns and rows, or for all cells in the control by setting the properties of the `DataGridViewCellStyle` objects accessed through various `DataGridView` control properties. Additionally, you can modify these styles dynamically based on factors such as the cell value by handling the `CellFormatting` event.  
  
## In This Section  
 [How to: Change the Border and Gridline Styles in the Windows Forms DataGridView Control](change-the-border-and-gridline-styles-in-the-datagrid.md)  
 Describes how to set `DataGridView` properties that define the appearance of the control border and the boundary lines between cells.  
  
 [Cell Styles in the Windows Forms DataGridView Control](cell-styles-in-the-windows-forms-datagridview-control.md)  
 Describes the `DataGridViewCellStyle` class and how properties of that type interact to define how cells are displayed in the control.  
  
 [How to: Set Default Cell Styles for the Windows Forms DataGridView Control](how-to-set-default-cell-styles-for-the-windows-forms-datagridview-control.md)  
 Describes how to use `DataGridViewCellStyle` properties to define the default appearance of cells in specific rows and columns and in the entire control.  
  
 [How to: Format Data in the Windows Forms DataGridView Control](how-to-format-data-in-the-windows-forms-datagridview-control.md)  
 Describes how to format cell display values using `DataGridViewCellStyle` properties.  
  
 [How to: Set Font and Color Styles in the Windows Forms DataGridView Control](how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control.md)  
 Describes how to use the `DefaultCellStyle` property to set basic display characteristics for all cells in the control.  
  
 [How to: Set Alternating Row Styles for the Windows Forms DataGridView Control](how-to-set-alternating-row-styles-for-the-windows-forms-datagridview-control.md)  
 Describes how to create a ledger-like effect in the control using alternating rows that are displayed differently.  
  
 [How to: Use the Row Template to Customize Rows in the Windows Forms DataGridView Control](use-the-row-template-to-customize-rows-in-the-datagrid.md)  
 Describes how to use the `RowTemplate` property to set row properties that will be used for all rows in the control.  
  
## Reference  
 <xref:System.Windows.Forms.DataGridView>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridView> control.  
  
 <xref:System.Windows.Forms.DataGridViewCellStyle>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridViewCellStyle> class.  
  
 <xref:System.Windows.Forms.DataGridView.CellFormatting>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridView.CellFormatting> event.  
  
 <xref:System.Windows.Forms.DataGridView.RowTemplate%2A>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridView.RowTemplate%2A> property.  
  
## Related Sections  
 [Customizing the Windows Forms DataGridView Control](customizing-the-windows-forms-datagridview-control.md)  
 Provides topics that describe custom painting <xref:System.Windows.Forms.DataGridView> cells and rows, and creating derived cell, column, and row types.  
  
 [Basic Column, Row, and Cell Features in the Windows Forms DataGridView Control](basic-column-row-and-cell-features-wf-datagridview-control.md)  
 Provides topics that describe commonly used cell, row, and column properties.  
  
## See also

- [DataGridView Control](datagridview-control-windows-forms.md)
