GridViewDeleteEventArgs::Keys Property
Gets a dictionary of field name/value pairs that represent the primary key of the row to delete.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.Collections.Specialized::IOrderedDictionaryA dictionary that contains field name/value pairs that represent the primary key of the row to delete.
When the DataKeyNames property of a GridView control is set, use the Keys property (dictionary) to get the value of the primary key or keys of the row to delete.
Note |
|---|
To get the values of the non-key fields, use the Values property. |
The Keys dictionary is automatically populated with the name/value pairs of the field or fields specified in the DataKeyNames property. If multiple fields form the primary key, a separate entry is added to the Keys dictionary for each key field.
To determine the name of a key field, use the DictionaryEntry::Key property of a System.Collections::DictionaryEntry object in the Keys dictionary. To determine the value of a key field, use the DictionaryEntry::Value property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note