1 What is the DataGridView
&!
7(
$!!&"
&&" !"
!&
!H&I
#"&!!
&"
!&#F
J
"&!!(!
&4!7!
1.1 Differences between the DataGridView and DataGrid controls
"!"
0&
(
!!"!
DataGridView control feature Description
Multiple column types
The DataGridView control provides more built-in column types than the
DataGrid control. These column types meet the needs of most common
scenarios, but are also easier to extend or replace than the column types in
the DataGrid control.
Multiple ways to display data
The DataGrid control is limited to displaying data from an external data
source. The DataGridView control, however, can display unbound data
stored in the control, data from a bound data source, or bound and unbound
data together. You can also implement virtual mode in the DataGridView
control to provide custom data management.
Multiple ways to customize the
display of data
The DataGridView control provides many properties and events that enable
you to specify how data is formatted and displayed. For example, you can
change the appearance of cells, rows, and columns depending on the data
they contain, or you can replace data of one data type with equivalent data
of another type.
Multiple options for changing cell,
row, column, and header
appearance and behavior
The DataGridView control enables you to work with individual grid
components in numerous ways. For example, you can freeze rows and
columns to prevent them from scrolling; hide rows, columns, and headers;
change the way row, column, and header sizes are adjusted; change the
way users make selections; and provide ToolTips and shortcut menus for
individual cells, rows, and columns.
"!"!
!K
!2
C6>