1<?xml version="1.0" encoding="utf-8"?>
2<Type Name="GridViewDeletedEventArgs" FullName="System.Web.UI.WebControls.GridViewDeletedEventArgs">
3  <TypeSignature Language="C#" Value="public class GridViewDeletedEventArgs : EventArgs" />
4  <AssemblyInfo>
5    <AssemblyName>System.Web</AssemblyName>
6    <AssemblyVersion>2.0.0.0</AssemblyVersion>
7  </AssemblyInfo>
8  <Base>
9    <BaseTypeName>System.EventArgs</BaseTypeName>
10  </Base>
11  <Interfaces />
12  <Docs>
13    <since version=".NET 2.0" />
14    <remarks>
15      <attribution license="cc4" from="Microsoft" modified="false" />
16      <para>The <see cref="T:System.Web.UI.WebControls.GridView" /> control raises the <see cref="E:System.Web.UI.WebControls.GridView.RowDeleted" /> event when a Delete button (a button with its CommandName property set to "Delete") within the control is clicked, but after the <see cref="T:System.Web.UI.WebControls.GridView" /> control deletes the record. This allows you to provide an event-handling method that performs a custom routine, such as checking the results of a delete operation, whenever this event occurs.</para>
17      <para>A <see cref="T:System.Web.UI.WebControls.GridViewDeletedEventArgs" /> object is passed to the event-handling method, which allows you to determine the number of records affected and any exceptions that might have occurred. To determine the number of records affected by the delete operation, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.AffectedRows" /> property. Use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Exception" /> property to determine whether any exceptions occurred. You can also indicate whether the exception was handled in the event-handling method by setting the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.ExceptionHandled" /> property.</para>
18      <block subset="none" type="note">
19        <para>If an exception occurs during the delete operation and the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.ExceptionHandled" /> property is set to false, the <see cref="T:System.Web.UI.WebControls.GridView" /> control re-throws the exception.</para>
20      </block>
21      <para>If you want to access the name/value pairs of the key fields and non-key fields of the deleted record, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Keys" /> and <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Values" /> properties, respectively.</para>
22      <para>For more information about handling events, see <format type="text/html"><a href="01e4f1bc-e55e-413f-98c7-6588493e5f67">Consuming Events</a></format>.</para>
23    </remarks>
24    <summary>
25      <attribution license="cc4" from="Microsoft" modified="false" />
26      <para>Provides data for the <see cref="E:System.Web.UI.WebControls.GridView.RowDeleted" /> event.</para>
27    </summary>
28  </Docs>
29  <Members>
30    <Member MemberName=".ctor">
31      <MemberSignature Language="C#" Value="public GridViewDeletedEventArgs (int affectedRows, Exception e);" />
32      <MemberType>Constructor</MemberType>
33      <Parameters>
34        <Parameter Name="affectedRows" Type="System.Int32" />
35        <Parameter Name="e" Type="System.Exception" />
36      </Parameters>
37      <Docs>
38        <since version=".NET 2.0" />
39        <remarks>
40          <attribution license="cc4" from="Microsoft" modified="false" />
41          <para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.GridViewDeletedEventArgs" /> class.</para>
42          <para>The following table shows the initial property values for an instance of <see cref="T:System.Web.UI.WebControls.GridViewDeletedEventArgs" />.</para>
43          <list type="table">
44            <listheader>
45              <item>
46                <term>
47                  <para>Property </para>
48                </term>
49                <description>
50                  <para>Initial value </para>
51                </description>
52              </item>
53            </listheader>
54            <item>
55              <term>
56                <para>
57                  <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.AffectedRows" />
58                </para>
59              </term>
60              <description>
61                <para>The value of the <paramref name="affectedRows" /> parameter.</para>
62              </description>
63            </item>
64            <item>
65              <term>
66                <para>
67                  <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Exception" />
68                </para>
69              </term>
70              <description>
71                <para>The <see cref="T:System.Exception" /> object contained in the <paramref name="e" /> parameter.</para>
72              </description>
73            </item>
74            <item>
75              <term>
76                <para>
77                  <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.ExceptionHandled" />
78                </para>
79              </term>
80              <description>
81                <para>Initialized to false.</para>
82              </description>
83            </item>
84          </list>
85          <block subset="none" type="note">
86            <para>This constructor is used primarily by control developers when raising events.</para>
87          </block>
88        </remarks>
89        <summary>
90          <attribution license="cc4" from="Microsoft" modified="false" />
91          <para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.GridViewDeletedEventArgs" /> class.</para>
92        </summary>
93        <param name="affectedRows">
94          <attribution license="cc4" from="Microsoft" modified="false" />The number of rows affected by the delete operation.</param>
95        <param name="e">
96          <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Exception" /> that represents the exception raised when the delete operation was performed. If no exception is raised, use null for this parameter.</param>
97      </Docs>
98      <AssemblyInfo>
99        <AssemblyVersion>2.0.0.0</AssemblyVersion>
100      </AssemblyInfo>
101    </Member>
102    <Member MemberName="AffectedRows">
103      <MemberSignature Language="C#" Value="public int AffectedRows { get; }" />
104      <MemberType>Property</MemberType>
105      <ReturnValue>
106        <ReturnType>System.Int32</ReturnType>
107      </ReturnValue>
108      <Docs>
109        <value>To be added.</value>
110        <since version=".NET 2.0" />
111        <remarks>
112          <attribution license="cc4" from="Microsoft" modified="false" />
113          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.AffectedRows" /> property to determine the number of records affected by the delete operation. This property is commonly used to verify that the correct number of records was deleted in the following situations:</para>
114          <list type="bullet">
115            <item>
116              <para>Verify that only a single record was deleted. Sometimes an improperly written delete statement can delete multiple records.</para>
117            </item>
118            <item>
119              <para>Verify that a record was deleted when an error occurs during the delete operation that does not raise an exception.</para>
120            </item>
121            <item>
122              <para>Verify that a record was deleted when a data source control that supports optimistic concurrency (such as the <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> and <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> controls) has its <see cref="P:System.Web.UI.WebControls.SqlDataSource.ConflictDetection" /> property set to the ConflictOptions.CompareAllValues enumeration value. Under this setting, a record that has been modified by another user concurrently might not be deleted.</para>
123            </item>
124          </list>
125        </remarks>
126        <summary>
127          <attribution license="cc4" from="Microsoft" modified="false" />
128          <para>Gets the number of rows affected by the delete operation.</para>
129        </summary>
130      </Docs>
131      <AssemblyInfo>
132        <AssemblyVersion>2.0.0.0</AssemblyVersion>
133      </AssemblyInfo>
134    </Member>
135    <Member MemberName="Exception">
136      <MemberSignature Language="C#" Value="public Exception Exception { get; }" />
137      <MemberType>Property</MemberType>
138      <ReturnValue>
139        <ReturnType>System.Exception</ReturnType>
140      </ReturnValue>
141      <Docs>
142        <value>To be added.</value>
143        <since version=".NET 2.0" />
144        <remarks>
145          <attribution license="cc4" from="Microsoft" modified="false" />
146          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Exception" /> property to determine the exception that was raised during the delete operation. If no exceptions were raised, this property returns null.</para>
147          <block subset="none" type="note">
148            <para>If an exception was raised and you decide to handle the exception in the event handler, be sure to set the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.ExceptionHandled" /> property to true; otherwise, the <see cref="T:System.Web.UI.WebControls.GridView" /> control re-throws the exception.</para>
149          </block>
150        </remarks>
151        <summary>
152          <attribution license="cc4" from="Microsoft" modified="false" />
153          <para>Gets the exception (if any) that was raised during the delete operation.</para>
154        </summary>
155      </Docs>
156      <AssemblyInfo>
157        <AssemblyVersion>2.0.0.0</AssemblyVersion>
158      </AssemblyInfo>
159    </Member>
160    <Member MemberName="ExceptionHandled">
161      <MemberSignature Language="C#" Value="public bool ExceptionHandled { set; get; }" />
162      <MemberType>Property</MemberType>
163      <ReturnValue>
164        <ReturnType>System.Boolean</ReturnType>
165      </ReturnValue>
166      <Docs>
167        <value>To be added.</value>
168        <since version=".NET 2.0" />
169        <remarks>
170          <attribution license="cc4" from="Microsoft" modified="false" />
171          <para>When an exception is raised during the delete operation, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.ExceptionHandled" /> property to indicate whether the exception was handled in the event handler. When this property is set to true, the exception is considered handled and is not re-thrown. If this property is set to false, the <see cref="T:System.Web.UI.WebControls.GridView" /> control re-throws the exception. To determine which exception was raised, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Exception" /> property.</para>
172        </remarks>
173        <summary>
174          <attribution license="cc4" from="Microsoft" modified="false" />
175          <para>Gets or sets a value indicating whether an exception that was raised during the delete operation was handled in the event handler.</para>
176        </summary>
177      </Docs>
178      <AssemblyInfo>
179        <AssemblyVersion>2.0.0.0</AssemblyVersion>
180      </AssemblyInfo>
181    </Member>
182    <Member MemberName="Keys">
183      <MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Keys { get; }" />
184      <MemberType>Property</MemberType>
185      <ReturnValue>
186        <ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
187      </ReturnValue>
188      <Docs>
189        <value>To be added.</value>
190        <since version=".NET 2.0" />
191        <remarks>
192          <attribution license="cc4" from="Microsoft" modified="false" />
193          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Keys" /> property to access the values of the key fields (as specified by the <see cref="P:System.Web.UI.WebControls.GridView.DataKeyNames" /> property) for a deleted record. For example, you can use these values to keep a log of deleted records.</para>
194          <block subset="none" type="note">
195            <para>This property contains only the key fields. To access the non-key fields, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Values" /> property.</para>
196          </block>
197          <para>The <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Keys" /> property returns an object that implements the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> interface. The object contains <see cref="T:System.Collections.DictionaryEntry" /> objects that represent the key fields of the deleted record.</para>
198        </remarks>
199        <summary>
200          <attribution license="cc4" from="Microsoft" modified="false" />
201          <para>Gets an ordered dictionary of key field name/value pairs for the deleted record.</para>
202        </summary>
203      </Docs>
204      <AssemblyInfo>
205        <AssemblyVersion>2.0.0.0</AssemblyVersion>
206      </AssemblyInfo>
207    </Member>
208    <Member MemberName="Values">
209      <MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Values { get; }" />
210      <MemberType>Property</MemberType>
211      <ReturnValue>
212        <ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
213      </ReturnValue>
214      <Docs>
215        <value>To be added.</value>
216        <since version=".NET 2.0" />
217        <remarks>
218          <attribution license="cc4" from="Microsoft" modified="false" />
219          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Values" /> property to access the values of the non-key fields for a deleted record. For example, you can use these values to keep a log of deleted records.</para>
220          <block subset="none" type="note">
221            <para>The <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Values" /> property is populated only when two-way binding expressions are used in the item template. For more information on two-way binding expressions, see <format type="text/html"><a href="ab7b2846-975b-4057-a948-45527497c742">ASP.NET Data Binding</a></format>.</para>
222          </block>
223          <para>The <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Values" /> property returns an object that implements the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> interface. The object contains <see cref="T:System.Collections.DictionaryEntry" /> objects that represent the non-key fields of the deleted record.</para>
224          <block subset="none" type="note">
225            <para>This property does not contain the key fields (as specified by the <see cref="P:System.Web.UI.WebControls.GridView.DataKeyNames" /> property) for the deleted record. To access the key fields, use the <see cref="P:System.Web.UI.WebControls.GridViewDeletedEventArgs.Keys" /> property.</para>
226          </block>
227        </remarks>
228        <summary>
229          <attribution license="cc4" from="Microsoft" modified="false" />
230          <para>Gets a dictionary of the non-key field name/value pairs for the deleted record.</para>
231        </summary>
232      </Docs>
233      <AssemblyInfo>
234        <AssemblyVersion>2.0.0.0</AssemblyVersion>
235      </AssemblyInfo>
236    </Member>
237  </Members>
238</Type>