Gets a collection of System.Web.UI.WebControls.DataKey objects that represent the data key value of each row in a System.Web.UI.WebControls.GridView control.
Documentation for this section has not yet been entered.
When the GridView.DataKeyNames property is set, the System.Web.UI.WebControls.GridView control automatically creates a System.Web.UI.WebControls.DataKey object for each row in the control. The System.Web.UI.WebControls.DataKey object contains the values of the field or fields specified in the GridView.DataKeyNames property. The System.Web.UI.WebControls.DataKey objects are then added to the control's GridView.DataKeys collection. Use the GridView.DataKeys property to retrieve the System.Web.UI.WebControls.DataKey object for a specific data row in the System.Web.UI.WebControls.GridView control.
You can use the GridView.SelectedDataKey property to retrieve the System.Web.UI.WebControls.DataKey object for the currently selected row. You can also use the GridView.SelectedValue property to retrieve the data key value for the currently selected row directly.