-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
EditCommandColumn.xml
435 lines (372 loc) · 33.6 KB
/
EditCommandColumn.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<Type Name="EditCommandColumn" FullName="System.Web.UI.WebControls.EditCommandColumn">
<TypeSignature Language="C#" Value="public class EditCommandColumn : System.Web.UI.WebControls.DataGridColumn" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EditCommandColumn extends System.Web.UI.WebControls.DataGridColumn" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.EditCommandColumn" />
<TypeSignature Language="VB.NET" Value="Public Class EditCommandColumn
Inherits DataGridColumn" />
<TypeSignature Language="F#" Value="type EditCommandColumn = class
 inherit DataGridColumn" />
<TypeSignature Language="C++ CLI" Value="public ref class EditCommandColumn : System::Web::UI::WebControls::DataGridColumn" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.WebControls.DataGridColumn</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>A special column type for the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control that contains the <see langword="Edit" /> buttons for editing data items in each row.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.EditCommandColumn> class to create a special column for the <xref:System.Web.UI.WebControls.DataGrid> control that contains the `Edit`, `Update`, and `Cancel` buttons for each data row in the grid. These buttons allow you to edit the values of a row in the <xref:System.Web.UI.WebControls.DataGrid> control.
If no row is selected, an `Edit` button displays in the <xref:System.Web.UI.WebControls.EditCommandColumn> object for each data row in the <xref:System.Web.UI.WebControls.DataGrid> control. When the `Edit` button for an item is clicked, the <xref:System.Web.UI.WebControls.DataGrid.EditCommand> event is raised and the `Edit` button is replaced with the `Update` and `Cancel` buttons. You need to provide code to handle the <xref:System.Web.UI.WebControls.DataGrid.EditCommand> event. A typical event handler sets the <xref:System.Web.UI.WebControls.DataGrid.EditItemIndex%2A> property to the selected row, and then rebinds the data to the <xref:System.Web.UI.WebControls.DataGrid> control.
> [!NOTE]
> You must provide values for the <xref:System.Web.UI.WebControls.EditCommandColumn.CancelText%2A>, <xref:System.Web.UI.WebControls.EditCommandColumn.EditText%2A>, and <xref:System.Web.UI.WebControls.EditCommandColumn.UpdateText%2A> properties. Otherwise, the associated buttons will not appear in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
The buttons in the <xref:System.Web.UI.WebControls.EditCommandColumn> can be set to display as hyperlinks or push buttons by setting the <xref:System.Web.UI.WebControls.EditCommandColumn.ButtonType%2A> property.
Clicking the `Update` or `Cancel` button raises the <xref:System.Web.UI.WebControls.DataGrid.UpdateCommand> or <xref:System.Web.UI.WebControls.DataGrid.CancelCommand> event, respectively. You need to provide code to handle these events.
A typical handler for the <xref:System.Web.UI.WebControls.DataGrid.UpdateCommand> event updates the data, sets the <xref:System.Web.UI.WebControls.DataGrid.EditItemIndex%2A> property to `-1` (to deselect the item), and then rebinds the data to the <xref:System.Web.UI.WebControls.DataGrid> control.
A typical handler for the <xref:System.Web.UI.WebControls.DataGrid.CancelCommand> event sets the <xref:System.Web.UI.WebControls.DataGrid.EditItemIndex%2A> property to `-1` (to deselect the item), and then rebinds the data to the <xref:System.Web.UI.WebControls.DataGrid> control.
> [!CAUTION]
> The <xref:System.Web.UI.WebControls.EditCommandColumn> object can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a <xref:System.Web.UI.WebControls.DataGrid> control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see [Securing Standard Controls](https://learn.microsoft.com/previous-versions/aspnet/ms178270(v=vs.100)), [How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings](https://learn.microsoft.com/previous-versions/aspnet/a2a4yykt(v=vs.100)), and [Validating User Input in ASP.NET Web Pages](https://learn.microsoft.com/previous-versions/aspnet/7kh55542(v=vs.100)).
By default, page validation is performed when an `Update` button in the <xref:System.Web.UI.WebControls.EditCommandColumn> control is clicked. Page validation determines whether the input controls that are associated with a validation control on the page all pass the validation rules that are specified by the validation control. To prevent page validation from occurring, set the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property to `false`.
## Examples
The following code example demonstrates how to add an <xref:System.Web.UI.WebControls.EditCommandColumn> object to a <xref:System.Web.UI.WebControls.DataGrid> control.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataGridEdit/CS/datagrideditcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataGridEdit/VB/datagrideditvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DataGrid" />
<altmember cref="P:System.Web.UI.WebControls.DataGrid.EditItemIndex" />
<altmember cref="E:System.Web.UI.WebControls.DataGrid.EditCommand" />
<altmember cref="E:System.Web.UI.WebControls.DataGrid.UpdateCommand" />
<altmember cref="E:System.Web.UI.WebControls.DataGrid.CancelCommand" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EditCommandColumn ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.EditCommandColumn.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 EditCommandColumn();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor to create and initialize a new instance of the <xref:System.Web.UI.WebControls.EditCommandColumn> class.
## Examples
The following example demonstrates how to create and initialize a new instance of the <xref:System.Web.UI.WebControls.EditCommandColumn> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic EditCommandColumn.EditCommandColumn Example/CS/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic EditCommandColumn.EditCommandColumn Example/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ButtonType">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.ButtonColumnType ButtonType { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.ButtonColumnType ButtonType" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.ButtonType" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ButtonType As ButtonColumnType" />
<MemberSignature Language="F#" Value="member this.ButtonType : System.Web.UI.WebControls.ButtonColumnType with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.ButtonType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::ButtonColumnType ButtonType { System::Web::UI::WebControls::ButtonColumnType get(); void set(System::Web::UI::WebControls::ButtonColumnType value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Web.UI.WebControls.ButtonColumnType.LinkButton)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Web.UI.WebControls.ButtonColumnType.LinkButton)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ButtonColumnType</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the button type for the column.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.ButtonColumnType" /> values. The default value is <see langword="LinkButton" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.EditCommandColumn.ButtonType%2A> property to specify whether the buttons in the column display as push buttons or hyperlinks.
The value of this property is stored in view state.
## Examples
The following example demonstrates how to use the <xref:System.Web.UI.WebControls.EditCommandColumn.ButtonType%2A> property to display the `Edit` command buttons as push buttons.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataGridEdit/CS/datagrideditcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataGridEdit/VB/datagrideditvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The specified button type is not one of the <see cref="T:System.Web.UI.WebControls.ButtonColumnType" /> values.</exception>
</Docs>
</Member>
<Member MemberName="CancelText">
<MemberSignature Language="C#" Value="public virtual string CancelText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CancelText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property CancelText As String" />
<MemberSignature Language="F#" Value="member this.CancelText : string with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.CancelText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ CancelText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text to display for the <see langword="Cancel" /> command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</summary>
<value>The caption to display for the <see langword="Cancel" /> command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.EditCommandColumn.CancelText%2A> property to specify the text to display for the `Cancel` command button in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
> [!NOTE]
> You must provide a value for the <xref:System.Web.UI.WebControls.EditCommandColumn.CancelText%2A> property. Otherwise, the `Cancel` command button will not appear in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
The value of this property is stored in view state.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <xref:System.ComponentModel.LocalizableAttribute> and [Globalization and Localization](https://learn.microsoft.com/previous-versions/aspnet/c6zyy3s9(v=vs.100)).
## Examples
The following example demonstrates how to use the <xref:System.Web.UI.WebControls.EditCommandColumn.CancelText%2A> property to provide custom text for the `Cancel` command button.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataGridEdit/CS/datagrideditcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataGridEdit/VB/datagrideditvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.EditText" />
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" />
</Docs>
</Member>
<Member MemberName="CausesValidation">
<MemberSignature Language="C#" Value="public virtual bool CausesValidation { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CausesValidation" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property CausesValidation As Boolean" />
<MemberSignature Language="F#" Value="member this.CausesValidation : bool with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.CausesValidation" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool CausesValidation { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether validation is performed when an <see langword="Update" /> button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object is clicked.</summary>
<value>
<see langword="true" /> if validation is performed when an <see langword="Update" /> button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> is clicked; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, page validation is performed when an `Update` button in a <xref:System.Web.UI.WebControls.EditCommandColumn> control is clicked. Page validation determines whether the input controls that are associated with a validation control on the page all pass the validation rules that are specified by the validation control.
You can specify or determine whether validation is performed on both the client and the server when an `Update` button in an <xref:System.Web.UI.WebControls.EditCommandColumn> control is clicked by using the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property. To prevent validation from being performed, set the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property to `false`.
When the value of the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property is set to `true`, you can also use the <xref:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup%2A> property to specify the name of the validation group for which an `Update` button in the <xref:System.Web.UI.WebControls.EditCommandColumn> object causes validation.
The value of this property is stored in view state.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Page.Validate" />
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" />
</Docs>
</Member>
<Member MemberName="EditText">
<MemberSignature Language="C#" Value="public virtual string EditText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string EditText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.EditText" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property EditText As String" />
<MemberSignature Language="F#" Value="member this.EditText : string with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.EditText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ EditText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text to display for the <see langword="Edit" /> button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</summary>
<value>The caption to display for the <see langword="Edit" /> button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.EditCommandColumn.EditText%2A> property to specify the text to display for the `Edit` button in the <xref:System.Web.UI.WebControls.EditCommandColumn> control.
> [!NOTE]
> You must provide a value for the <xref:System.Web.UI.WebControls.EditCommandColumn.EditText%2A> property. Otherwise, the `Edit` button will not appear in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
The value of this property is stored in view state.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <xref:System.ComponentModel.LocalizableAttribute> and [Globalization and Localization](https://learn.microsoft.com/previous-versions/aspnet/c6zyy3s9(v=vs.100)).
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.EditCommandColumn.EditText%2A> property to provide custom text for the `Edit` button.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataGridEdit/CS/datagrideditcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataGridEdit/VB/datagrideditvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" />
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" />
</Docs>
</Member>
<Member MemberName="InitializeCell">
<MemberSignature Language="C#" Value="public override void InitializeCell (System.Web.UI.WebControls.TableCell cell, int columnIndex, System.Web.UI.WebControls.ListItemType itemType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void InitializeCell(class System.Web.UI.WebControls.TableCell cell, int32 columnIndex, valuetype System.Web.UI.WebControls.ListItemType itemType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.EditCommandColumn.InitializeCell(System.Web.UI.WebControls.TableCell,System.Int32,System.Web.UI.WebControls.ListItemType)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub InitializeCell (cell As TableCell, columnIndex As Integer, itemType As ListItemType)" />
<MemberSignature Language="F#" Value="override this.InitializeCell : System.Web.UI.WebControls.TableCell * int * System.Web.UI.WebControls.ListItemType -> unit" Usage="editCommandColumn.InitializeCell (cell, columnIndex, itemType)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void InitializeCell(System::Web::UI::WebControls::TableCell ^ cell, int columnIndex, System::Web::UI::WebControls::ListItemType itemType);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="System.Web.UI.WebControls.TableCell" />
<Parameter Name="columnIndex" Type="System.Int32" />
<Parameter Name="itemType" Type="System.Web.UI.WebControls.ListItemType" />
</Parameters>
<Docs>
<param name="cell">A <see cref="T:System.Web.UI.WebControls.TableCell" /> that contains information about the cell to initialize.</param>
<param name="columnIndex">The column number where the cell is located.</param>
<param name="itemType">One of the <see cref="T:System.Web.UI.WebControls.ListItemType" /> values.</param>
<summary>Initializes a cell within the column.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UpdateText">
<MemberSignature Language="C#" Value="public virtual string UpdateText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string UpdateText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property UpdateText As String" />
<MemberSignature Language="F#" Value="member this.UpdateText : string with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.UpdateText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ UpdateText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text to display for the <see langword="Update" /> command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</summary>
<value>The caption to display for the <see langword="Update" /> command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.EditCommandColumn.UpdateText%2A> property to specify the text to display for the `Update` command button in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
> [!NOTE]
> You must provide a value for the <xref:System.Web.UI.WebControls.EditCommandColumn.UpdateText%2A> property. Otherwise, the `Update` command button will not appear in the <xref:System.Web.UI.WebControls.EditCommandColumn>.
The value of this property is stored in view state.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <xref:System.ComponentModel.LocalizableAttribute> and [Globalization and Localization](https://learn.microsoft.com/previous-versions/aspnet/c6zyy3s9(v=vs.100)).
## Examples
The following example demonstrates how to use the <xref:System.Web.UI.WebControls.EditCommandColumn.UpdateText%2A> property to provide custom text for the `Update` command button.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataGridEdit/CS/datagrideditcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataGridEdit/VB/datagrideditvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" />
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.EditText" />
</Docs>
</Member>
<Member MemberName="ValidationGroup">
<MemberSignature Language="C#" Value="public virtual string ValidationGroup { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ValidationGroup" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ValidationGroup As String" />
<MemberSignature Language="F#" Value="member this.ValidationGroup : string with get, set" Usage="System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ ValidationGroup { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the group of validation controls for which the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object causes validation when it posts back to the server.</summary>
<value>The group of validation controls for which the Update button in an <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> causes validation when it posts back to the server. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Validation groups allow you to assign validation controls on a page to a specific category. Each validation group can be validated independently of other validation groups on the page. Use the <xref:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup%2A> property to specify the name of the validation group for which the Update button in an <xref:System.Web.UI.WebControls.EditCommandColumn> object causes validation when it posts back to the server.
The <xref:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup%2A> property has an effect only when the value of the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property is set to `true`. When you specify a value for the <xref:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup%2A> property, only the validation controls that are part of the specified group are validated when the Update button in an <xref:System.Web.UI.WebControls.EditCommandColumn> object posts back to the server. If you do not specify a value for the <xref:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup%2A> property and the <xref:System.Web.UI.WebControls.EditCommandColumn.CausesValidation%2A> property is set to `true`, all validation controls on the page that are not assigned to a validation group are validated when the Update button in an <xref:System.Web.UI.WebControls.EditCommandColumn> object posts back to the server.
The value of this property is stored in view state.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" />
<altmember cref="T:System.Web.UI.WebControls.RequiredFieldValidator" />
</Docs>
</Member>
</Members>
</Type>