The DataColumn Class You use an object of the DataColumn class to represent a column.. Table 11.6: DataColumn PROPERTIES PROPERTY TYPE DESCRIPTION values are allowed in this DataColumn
Trang 1The DataColumn Class
You use an object of the DataColumn class to represent a column You can also store
properties
Table 11.6: DataColumn PROPERTIES
PROPERTY TYPE DESCRIPTION
values are allowed in this DataColumn object The default is true
DataColumn object automatically increments the value of the column for new rows The default is false
object Applies only when the AutoIncrement property is set to true The default is 0
the AutoIncrement property is set to true The default
is 1
for the column is shown in Windows forms The default is null
object This determines how a DataColumn is saved
in an XML document using the WriteXml() method
column value stored in the DataColumn object This can be Boolean, Byte, Char, DateTime, Decimal, Double, Int16, Int32, Int64, SByte, Single, String, TimeSpan, UInt16, or UInt64
when new rows are created When AutoIncrement is set to true, DefaultValue is not used
stored in a DataColumn object The default is -1
Trang 2Table 11.6: DataColumn PROPERTIES
PROPERTY TYPE DESCRIPTION
(0 is the first object)
DataColumn object can be changed once it has been added to a DataRow The default is false
belongs
DataColumn values in each DataRow object must be unique The default is false
You'll see the use of some of these properties, methods, and events later in this chapter