162 lines
13 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Type Name="FormViewDeleteEventArgs" FullName="System.Web.UI.WebControls.FormViewDeleteEventArgs">
<TypeSignature Language="C#" Value="public class FormViewDeleteEventArgs : System.ComponentModel.CancelEventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.CancelEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.UI.WebControls.FormView" /> control raises the <see cref="E:System.Web.UI.WebControls.FormView.ItemDeleting" /> event when a Delete button (a button with its CommandName property set to "Delete") within the control is clicked, but before the <see cref="T:System.Web.UI.WebControls.FormView" /> control deletes the record. This allows you to provide an event-handling method that performs a custom routine, such as verifying a record before deleting it, whenever this event occurs.</para>
<para>A <see cref="T:System.Web.UI.WebControls.FormViewDeleteEventArgs" /> object is passed to the event-handling method, which allows you to determine the index of the record being deleted and to indicate that the delete operation should be canceled. To determine the index of a record, use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.RowIndex" /> property. To cancel the delete operation, set the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property to true. You can also access the key fields and non-key fields by using the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> and <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> properties, respectively. These values are useful if you want to verify the record before deleting it.</para>
<block subset="none" type="note">
<para>It is possible to modify the key field values and non-key field values in the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> and <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> properties, respectively. If you change these values, the record that corresponds to the new values will be deleted.</para>
</block>
<para>For more information about handling events, see <format type="text/html"><a href="01e4f1bc-e55e-413f-98c7-6588493e5f67">Consuming Events</a></format>.</para>
<para>For a list of initial property values for an instance of the <see cref="T:System.Web.UI.WebControls.FormViewDeleteEventArgs" /> class, see the <see cref="M:System.Web.UI.WebControls.FormViewDeleteEventArgs.#ctor(System.Int32)" /> constructor.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides data for the <see cref="E:System.Web.UI.WebControls.FormView.ItemDeleting" /> event.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public FormViewDeleteEventArgs (int index);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">To be added.</param>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.FormViewDeleteEventArgs" /> class.</para>
<para>The following table shows the initial property value for an instance of the <see cref="T:System.Web.UI.WebControls.FormViewDeleteEventArgs" /> class.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Property</para>
</term>
<description>
<para>Initial Value</para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.RowIndex" />
</para>
</term>
<description>
<para>The value of the <paramref name="rowIndex" /> parameter.</para>
</description>
</item>
</list>
<block subset="none" type="note">
<para>This constructor is used primarily by control developers when raising events.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.FormViewDeleteEventArgs" /> class.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Keys">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Keys { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> property contains the values of the key fields listed in the <see cref="P:System.Web.UI.WebControls.FormView.DataKeyNames" /> property of a <see cref="T:System.Web.UI.WebControls.FormView" /> control. Use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> property to access the values of the key field or fields for the record to be deleted. For example, you can use these values to verify the record before deleting it, to change the record to delete, or to keep a log of deleted records.</para>
<block subset="none" type="note">
<para>This property contains only the key fields. To access the name/value pair values for the non-key fields, use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> property.</para>
</block>
<para>The <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> property returns an <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object that implements the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> interface. The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object contains <see cref="T:System.Collections.DictionaryEntry" /> objects that represent the key fields. To access the key field names, use the <see cref="P:System.Collections.Specialized.OrderedDictionary.Keys" /> property of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object. Similarly, you can access the key field values by using the <see cref="P:System.Collections.Specialized.OrderedDictionary.Values" /> property.</para>
<block subset="none" type="note">
<para>As a shortcut, you can also use the indexer of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object to access the key field values. The advantage in using the indexer is that it returns key field values directly. Data source controls that rely on the field order (such as <see cref="T:System.Web.UI.WebControls.AccessDataSource" />) can access key field values only by index.</para>
</block>
<para>The <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> and <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> properties are read-only; however, you can modify the field values of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object. If you change the key and non-key field values, the corresponding record will be deleted from the data source.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets an ordered dictionary of key field name/value pairs for the record to delete.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RowIndex">
<MemberSignature Language="C#" Value="public int RowIndex { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.RowIndex" /> property to determine the index of the record being deleted from the data source. The row index corresponds to the page index of the record being deleted.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the index of the record being deleted from the data source.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Values">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Values { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> property to access the values of the non-key fields for the record to be deleted. For example, you can use these values to verify the record before deleting it, or to keep a log of deleted records.</para>
<block subset="none" type="note">
<para>This property does not contain the key field or fields. To access the name/value pair values for the key field or fields, use the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> property.</para>
</block>
<para>The <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> property returns an <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object that implements the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> interface. The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object contains <see cref="T:System.Collections.DictionaryEntry" /> objects that represent the non-key fields. To access the field names, use the <see cref="P:System.Collections.Specialized.OrderedDictionary.Keys" /> property of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object. Similarly, you can access the field values by using the <see cref="P:System.Collections.Specialized.OrderedDictionary.Values" /> property.</para>
<block subset="none" type="note">
<para>As a shortcut, you can also use the indexer of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object to access the field values. The advantage in using the indexer is that it returns field values directly. Data source controls that rely on the field order (such as <see cref="T:System.Web.UI.WebControls.AccessDataSource" />) can access field values only by index.</para>
</block>
<para>The values in the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> collection do not get passed to the data source control. If the data source requires any of these values, you should add these values to the <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> collection.</para>
<para>The <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Keys" /> and <see cref="P:System.Web.UI.WebControls.FormViewDeleteEventArgs.Values" /> properties are read-only; however, you can modify the field values of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object. If you change the key and non-key field values, the corresponding record will be deleted from the data source.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a dictionary of the non-key field name/value pairs for the item to delete.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>