What is the DataGridView
Differences between the DataGridView and DataGrid controls
Highlight of features
Structure of DGV
Architecture Elements
Cells and Bands
DataGridViewCell
How a DataGridViewCell works
DataGridViewColumn
DataGridView Editing Controls
DataGridViewRow
Out of the box column/cell types
DataGridViewTextBoxColumn
DataGridViewCheckBoxColumn
DataGridViewImageColumn
DataGridViewButtonColumn
DataGridViewComboBoxColumn
DataErrors and the combo box column
DataGridViewLinkColumn
Working with Data
Data Entry and Validation Events
Order of Validation Events
Validating Data
Displaying error information
Data Entry in the New Row
Displaying the Row for New Records
Populating the Row for New Records with Default Data
The Rows Collection and the New Row
Typing in the New Row
Visual Customization of the Row for New Records
Sorting the New Row
Other Notes on the Row for New Records
Virtual Mode
Working with Null values
NullValue
DataSourceNullValue
DataError event
DataError Event for Edit Operations
DataError Contexts
Unbound
Bound
Valid Data Sources
List Change Notification
Object Change Notification
Virtual
Mixed mode Bound and Unbound
Styling
The DataGridViewCellStyle Class
Using DataGridViewCellStyle Objects
Style Inheritance
Setting Styles Dynamically
Custom painting
Paint Parts
Row Pre Paint and Post Paint
Autosizing
Sizing Options in the Windows Forms DataGridView Control
Resizing with the Mouse
Automatic Sizing
Programmatic Resizing
Customizing Content-based Sizing Behavior
Content-based Sizing Options
Selection modes
Programmatic Selection
Scrolling
Scroll event
Scroll bars
Scrolling Properties
Sorting
Programmatic Sorting
Custom Sorting
Border styles
Standard Border Styles
Advanced Border Styles
Enter-Edit modes
Clipboard copy modes
Frozen columns/rows
Implementing Custom cells and editing controls/cells
IDataGridViewEditingControl
IDataGridViewEditingCell
Virtual mode
Bound Mode and Virtual Mode
Supplementing Bound Mode
Replacing Bound Mode
Virtual-Mode Events
Best Practices in Virtual Mode
Capacity
Best Practices
Using Cell Styles Efficiently
Using Shortcut Menus Efficiently
Using Automatic Resizing Efficiently
Using the Selected Cells, Rows, and Columns Collections Efficiently
Using Shared Rows
Preventing Rows from Becoming Unshared
How do I prevent a particular cell from being editable?
How do I disable a cell?
How do I restrict user from setting focus to a specific cell?
How do I show controls in all cells regardless of edit?
Why does the cell text show up with square characters where they should be new lines?
How do I show icon and text in the same cell?
How do I hide a column?
How do I prevent the user from sorting on a column?
Databound DataGridView
Custom Sorting Using the SortCompare Event
Custom Sorting Using the IComparer Interface
How do I hook up events on the editing control?
When should I remove event handlers from the editing control?
How do I handle the SelectedIndexChanged event?
How do I perform drag and drop reorder of rows?
How do I make the last column wide enough to occupy all the remaining client area of the grid?
How do I have the cell text wrap?
How do I make the image column not show any images?
How do I enable typing in the combo box cell?
How do I have a combo box column display a sub set of data based upon the value of a different combo box column?
How do I show the error icon when the user is editing the cell?
How do I show unbound data along with bound data?
How do I show data that comes from two tables?
How do I show master-details?
How do I show master-details in the same DataGridView?
How do I prevent sorting?
How do I commit the data to the database when clicking on a toolstrip button?
How do I display a confirmation dialog when the user tries to delete a row?