1<?xml version="1.0" encoding="utf-8"?>
2<Type Name="GridViewUpdateEventArgs" FullName="System.Web.UI.WebControls.GridViewUpdateEventArgs">
3  <TypeSignature Language="C#" Value="public class GridViewUpdateEventArgs : System.ComponentModel.CancelEventArgs" />
4  <AssemblyInfo>
5    <AssemblyName>System.Web</AssemblyName>
6    <AssemblyVersion>2.0.0.0</AssemblyVersion>
7  </AssemblyInfo>
8  <Base>
9    <BaseTypeName>System.ComponentModel.CancelEventArgs</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.RowUpdating" /> event when a row's Update button is clicked, but before the <see cref="T:System.Web.UI.WebControls.GridView" /> control updates the row. This allows you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.</para>
17      <para>A <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" /> object is passed to the event-handling method, which allows you to determine the index of the current row and to indicate that the update operation should be canceled. To cancel the update operation, set the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property of the <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" /> object to true. You can also manipulate the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" />, <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" />, and <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> collections, if necessary, before the values are passed to the data source. A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source. This helps to prevent script injection attacks.</para>
18      <para>For more information about handling events, see <format type="text/html"><a href="01e4f1bc-e55e-413f-98c7-6588493e5f67">Consuming Events</a></format>.</para>
19      <para>For a list of initial property values for an instance of <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" />, see the <see cref="M:System.Web.UI.WebControls.GridViewSelectEventArgs.#ctor(System.Int32)" /> constructor.</para>
20    </remarks>
21    <summary>
22      <attribution license="cc4" from="Microsoft" modified="false" />
23      <para>Provides data for the <see cref="E:System.Web.UI.WebControls.GridView.RowUpdating" /> event.</para>
24    </summary>
25  </Docs>
26  <Members>
27    <Member MemberName=".ctor">
28      <MemberSignature Language="C#" Value="public GridViewUpdateEventArgs (int rowIndex);" />
29      <MemberType>Constructor</MemberType>
30      <Parameters>
31        <Parameter Name="rowIndex" Type="System.Int32" />
32      </Parameters>
33      <Docs>
34        <since version=".NET 2.0" />
35        <remarks>
36          <attribution license="cc4" from="Microsoft" modified="false" />
37          <para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" /> class using the specified row index.</para>
38          <para>The following table shows the initial property value for an instance of <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" />.</para>
39          <list type="table">
40            <listheader>
41              <item>
42                <term>
43                  <para>Property </para>
44                </term>
45                <description>
46                  <para>Initial value </para>
47                </description>
48              </item>
49            </listheader>
50            <item>
51              <term>
52                <para>
53                  <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.RowIndex" />
54                </para>
55              </term>
56              <description>
57                <para>The value contained in the <paramref name="rowIndex" /> parameter.</para>
58              </description>
59            </item>
60          </list>
61          <block subset="none" type="note">
62            <para>This constructor is used primarily by control developers when raising events.</para>
63          </block>
64        </remarks>
65        <summary>
66          <attribution license="cc4" from="Microsoft" modified="false" />
67          <para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.GridViewUpdateEventArgs" /> class.</para>
68        </summary>
69        <param name="rowIndex">
70          <attribution license="cc4" from="Microsoft" modified="false" />The index of the row being updated.</param>
71      </Docs>
72      <AssemblyInfo>
73        <AssemblyVersion>2.0.0.0</AssemblyVersion>
74      </AssemblyInfo>
75    </Member>
76    <Member MemberName="Keys">
77      <MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Keys { get; }" />
78      <MemberType>Property</MemberType>
79      <ReturnValue>
80        <ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
81      </ReturnValue>
82      <Docs>
83        <value>To be added.</value>
84        <since version=".NET 2.0" />
85        <remarks>
86          <attribution license="cc4" from="Microsoft" modified="false" />
87          <para>When the <see cref="P:System.Web.UI.WebControls.GridView.DataKeyNames" /> property of a <see cref="T:System.Web.UI.WebControls.GridView" /> control is set, use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> property (dictionary) to access the value of the primary key in the row to update.</para>
88          <block subset="none" type="note">
89            <para>To access the values of the non-key fields, use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> or <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> properties. The <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> property contains the updated values, while the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> property contains the original values.</para>
90          </block>
91          <para>The <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> dictionary is automatically populated with the name/value pairs of the field or fields specified in the <see cref="P:System.Web.UI.WebControls.GridView.DataKeyNames" /> property. If multiple fields form the primary key, a separate entry is added to the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> dictionary for each key field.</para>
92          <para>To determine the name of a key field, use the <see cref="P:System.Collections.DictionaryEntry.Key" /> property of a <see cref="T:System.Collections.DictionaryEntry" /> object contained in the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> dictionary. To determine the value of a key field, use the <see cref="P:System.Collections.DictionaryEntry.Value" /> property.</para>
93        </remarks>
94        <summary>
95          <attribution license="cc4" from="Microsoft" modified="false" />
96          <para>Gets a dictionary of field name/value pairs that represent the primary key of the row to update.</para>
97        </summary>
98      </Docs>
99      <AssemblyInfo>
100        <AssemblyVersion>2.0.0.0</AssemblyVersion>
101      </AssemblyInfo>
102    </Member>
103    <Member MemberName="NewValues">
104      <MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary NewValues { get; }" />
105      <MemberType>Property</MemberType>
106      <ReturnValue>
107        <ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
108      </ReturnValue>
109      <Docs>
110        <value>To be added.</value>
111        <since version=".NET 2.0" />
112        <remarks>
113          <attribution license="cc4" from="Microsoft" modified="false" />
114          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> property (dictionary) to access the values of the revised non-key fields in the row to update.</para>
115          <block subset="none" type="note">
116            <para>The primary key field or fields are not included in this dictionary. To access the values of the primary key field or fields, use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> property. To access the original values of the non-key fields in the row, use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> property.</para>
117          </block>
118          <para>The <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> property is automatically populated with the name/value pairs of the revised non-key fields in the row. A separate entry is added to the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> property for each non-key field in the row.</para>
119          <para>To determine the field name of an entry, use the <see cref="P:System.Collections.DictionaryEntry.Key" /> property of a <see cref="T:System.Collections.DictionaryEntry" /> object contained in the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> dictionary. To determine the value of an entry, use the <see cref="P:System.Collections.DictionaryEntry.Value" /> property.</para>
120        </remarks>
121        <summary>
122          <attribution license="cc4" from="Microsoft" modified="false" />
123          <para>Gets a dictionary containing the revised values of the non-key field name/value pairs in the row to update.</para>
124        </summary>
125      </Docs>
126      <AssemblyInfo>
127        <AssemblyVersion>2.0.0.0</AssemblyVersion>
128      </AssemblyInfo>
129    </Member>
130    <Member MemberName="OldValues">
131      <MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary OldValues { get; }" />
132      <MemberType>Property</MemberType>
133      <ReturnValue>
134        <ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
135      </ReturnValue>
136      <Docs>
137        <value>To be added.</value>
138        <since version=".NET 2.0" />
139        <remarks>
140          <attribution license="cc4" from="Microsoft" modified="false" />
141          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> property (dictionary) to access the original values of the fields in the row to update. This dictionary contains all fields in the row except the key fields. The key fields are defined in the <see cref="P:System.Web.UI.WebControls.GridView.DataKeyNames" /> property of a <see cref="T:System.Web.UI.WebControls.GridView" /> control.</para>
142          <block subset="none" type="note">
143            <para>You can access the key fields of the row by using the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.Keys" /> property. To access the revised values of the non-key fields in the row, use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.NewValues" /> property.</para>
144          </block>
145          <para>The <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> property is automatically populated with the original values of all the field name/value pairs in the row. A separate entry is added to the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> property for each field in the row.</para>
146          <para>To determine the field name of an entry, use the <see cref="P:System.Collections.DictionaryEntry.Key" /> property of a <see cref="T:System.Collections.DictionaryEntry" /> object contained in the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.OldValues" /> dictionary. To determine the value of an entry, use the <see cref="P:System.Collections.DictionaryEntry.Value" /> property.</para>
147        </remarks>
148        <summary>
149          <attribution license="cc4" from="Microsoft" modified="false" />
150          <para>Gets a dictionary containing the original field name/value pairs in the row to update.</para>
151        </summary>
152      </Docs>
153      <AssemblyInfo>
154        <AssemblyVersion>2.0.0.0</AssemblyVersion>
155      </AssemblyInfo>
156    </Member>
157    <Member MemberName="RowIndex">
158      <MemberSignature Language="C#" Value="public int RowIndex { get; }" />
159      <MemberType>Property</MemberType>
160      <ReturnValue>
161        <ReturnType>System.Int32</ReturnType>
162      </ReturnValue>
163      <Docs>
164        <value>To be added.</value>
165        <since version=".NET 2.0" />
166        <remarks>
167          <attribution license="cc4" from="Microsoft" modified="false" />
168          <para>Use the <see cref="P:System.Web.UI.WebControls.GridViewUpdateEventArgs.RowIndex" /> property to determine the index of the row being updated. The row index is often used to retrieve the corresponding row from the <see cref="P:System.Web.UI.WebControls.GridView.Rows" /> collection of the <see cref="T:System.Web.UI.WebControls.GridView" /> control, which allows you to access the row's properties.</para>
169        </remarks>
170        <summary>
171          <attribution license="cc4" from="Microsoft" modified="false" />
172          <para>Gets the index of the row being updated.</para>
173        </summary>
174      </Docs>
175      <AssemblyInfo>
176        <AssemblyVersion>2.0.0.0</AssemblyVersion>
177      </AssemblyInfo>
178    </Member>
179  </Members>
180</Type>