Documentation for this section has not yet been entered.
Use the DetailsView.DataKeyNames property to specify a comma-separated list of field names that represent the primary key of the data source. When the DetailsView.DataKeyNames property is set, the System.Web.UI.WebControls.DetailsView control automatically creates a System.Web.UI.WebControls.DataKey object that represents the key field or fields for the current record and stores it in the DetailsView.DataKey property. When the GridView.AutoGenerateColumns property is also set to true, the System.Web.UI.WebControls.DetailsView control automatically ensures that the field or fields specified in the DetailsView.DataKeyNames property are read-only.
You must set the DetailsView.DataKeyNames property for the automatic updating, deleting, and inserting features of the System.Web.UI.WebControls.DetailsView control to work.
If the DataControlField.Visible property of a row field is set to false, the row is not displayed in the System.Web.UI.WebControls.DetailsView control and the data for the row does not make a round trip to the client. If you want the data for a row that is not visible to make a round trip, add the field name to the DetailsView.DataKeyNames property.