<?xml version="1.0" encoding="utf-8"?> <Type Name="EditCommandColumn" FullName="System.Web.UI.WebControls.EditCommandColumn"> <TypeSignature Language="C#" Maintainer="auto" Value="public class EditCommandColumn : System.Web.UI.WebControls.DataGridColumn" /> <AssemblyInfo> <AssemblyName>System.Web</AssemblyName> <AssemblyPublicKey> </AssemblyPublicKey> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement> <Base> <BaseTypeName>System.Web.UI.WebControls.DataGridColumn</BaseTypeName> </Base> <Interfaces> </Interfaces> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> class to create a special column for the <see cref="T: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 <see cref="T:System.Web.UI.WebControls.DataGrid" /> control.</para> <para>If no row is selected, an Edit button displays in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object for each data row in the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control. When the Edit button for an item is clicked, the <see cref="E: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 <see cref="E:System.Web.UI.WebControls.DataGrid.EditCommand" /> event. A typical event handler sets the <see cref="P:System.Web.UI.WebControls.DataGrid.EditItemIndex" /> property to the selected row, and then rebinds the data to the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control.</para> <block subset="none" type="note"> <para>You must provide values for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" />, <see cref="P:System.Web.UI.WebControls.EditCommandColumn.EditText" />, and <see cref="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" /> properties. Otherwise, the associated buttons will not appear in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </block> <para>The buttons in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> can be set to display as hyperlinks or push buttons by setting the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ButtonType" /> property.</para> <para>Clicking the Update or Cancel button raises the <see cref="E:System.Web.UI.WebControls.DataGrid.UpdateCommand" /> or <see cref="E:System.Web.UI.WebControls.DataGrid.CancelCommand" /> event, respectively. You need to provide code to handle these events.</para> <para>A typical handler for the <see cref="E:System.Web.UI.WebControls.DataGrid.UpdateCommand" /> event updates the data, sets the <see cref="P:System.Web.UI.WebControls.DataGrid.EditItemIndex" /> property to -1 (to deselect the item), and then rebinds the data to the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control.</para> <para>A typical handler for the <see cref="E:System.Web.UI.WebControls.DataGrid.CancelCommand" /> event sets the <see cref="P:System.Web.UI.WebControls.DataGrid.EditItemIndex" /> property to -1 (to deselect the item), and then rebinds the data to the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control.</para> <block subset="none" type="note"> <para>The <see cref="T: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 <see cref="T: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 <format type="text/html"><a href="f3e7718f-63d0-44a3-bd5f-48cc2059c2a8">Securing Standard Controls</a></format>, <format type="text/html"><a href="6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</a></format>, and <format type="text/html"><a href="4ad3dacb-89e0-4cee-89ac-40a3f2a85461">Validating User Input in ASP.NET Web Pages</a></format>.</para> </block> <para>By default, page validation is performed when an Update button in the <see cref="T: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 <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> property to false.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>A special column type for the <see cref="T:System.Web.UI.WebControls.DataGrid" /> control that contains the Edit buttons for editing data items in each row.</para> </summary> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public EditCommandColumn ();" /> <MemberType>Constructor</MemberType> <ReturnValue /> <Parameters /> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use this constructor to create and initialize a new instance of the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> class.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> class.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="ButtonType"> <MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.ButtonColumnType ButtonType { set; get; }" /> <MemberType>Property</MemberType> <ReturnValue> <ReturnType>System.Web.UI.WebControls.ButtonColumnType</ReturnType> </ReturnValue> <Parameters /> <Docs> <value>To be added: an object of type 'ButtonColumnType'</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ButtonType" /> property to specify whether the buttons in the column display as push buttons or hyperlinks.</para> <para>The value of this property is stored in view state.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the button type for the column.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="CancelText"> <MemberSignature Language="C#" Value="public virtual string CancelText { set; get; }" /> <MemberType>Property</MemberType> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <value>To be added: an object of type 'string'</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" /> property to specify the text to display for the Cancel command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> <block subset="none" type="note"> <para>You must provide a value for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CancelText" /> property. Otherwise, the Cancel command button will not appear in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </block> <para>The value of this property is stored in view state.</para> <para>The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <see cref="T:System.ComponentModel.LocalizableAttribute" /> and <format type="text/html"><a href="8ef3838e-9d05-4236-9dd0-ceecff9df80d">ASP.NET Globalization and Localization</a></format>.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the text to display for the Cancel command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName>System.ComponentModel.Localizable(true)</AttributeName> </Attribute> <Attribute> <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName> </Attribute> </Attributes> </Member> <Member MemberName="CausesValidation"> <MemberSignature Language="C#" Value="public virtual bool CausesValidation { set; get; }" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Docs> <value>To be added.</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>By default, page validation is performed when an Update button in a <see cref="T: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.</para> <para>You can specify or determine whether validation is performed on both the client and the server when an Update button in an <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> control is clicked by using the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> property. To prevent validation from being performed, set the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> property to false.</para> <para>When the value of the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> property is set to true, you can also use the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" /> property to specify the name of the validation group for which an Update button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object causes validation.</para> <para>The value of this property is stored in view state.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets a value indicating whether validation is performed when an Update button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object is clicked.</para> </summary> </Docs> </Member> <Member MemberName="EditText"> <MemberSignature Language="C#" Value="public virtual string EditText { set; get; }" /> <MemberType>Property</MemberType> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <value>To be added: an object of type 'string'</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.EditText" /> property to specify the text to display for the Edit button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> control.</para> <block subset="none" type="note"> <para>You must provide a value for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.EditText" /> property. Otherwise, the Edit button will not appear in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </block> <para>The value of this property is stored in view state.</para> <para>The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <see cref="T:System.ComponentModel.LocalizableAttribute" /> and <format type="text/html"><a href="8ef3838e-9d05-4236-9dd0-ceecff9df80d">ASP.NET Globalization and Localization</a></format>.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the text to display for the Edit button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName>System.ComponentModel.Localizable(true)</AttributeName> </Attribute> <Attribute> <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName> </Attribute> </Attributes> </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);" /> <MemberType>Method</MemberType> <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> <remarks>To be added</remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Initializes a cell within the column.</para> </summary> <param name="cell"> <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Web.UI.WebControls.TableCell" /> that contains information about the cell to initialize. </param> <param name="columnIndex"> <attribution license="cc4" from="Microsoft" modified="false" />The column number where the cell is located. </param> <param name="itemType"> <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Web.UI.WebControls.ListItemType" /> values. </param> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="UpdateText"> <MemberSignature Language="C#" Value="public virtual string UpdateText { set; get; }" /> <MemberType>Property</MemberType> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <value>To be added: an object of type 'string'</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Use the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" /> property to specify the text to display for the Update command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> <block subset="none" type="note"> <para>You must provide a value for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.UpdateText" /> property. Otherwise, the Update command button will not appear in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </block> <para>The value of this property is stored in view state.</para> <para>The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <see cref="T:System.ComponentModel.LocalizableAttribute" /> and <format type="text/html"><a href="8ef3838e-9d05-4236-9dd0-ceecff9df80d">ASP.NET Globalization and Localization</a></format>.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the text to display for the Update command button in the <see cref="T:System.Web.UI.WebControls.EditCommandColumn" />.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName>System.ComponentModel.Localizable(true)</AttributeName> </Attribute> <Attribute> <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName> </Attribute> </Attributes> </Member> <Member MemberName="ValidationGroup"> <MemberSignature Language="C#" Value="public virtual string ValidationGroup { set; get; }" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <value>To be added.</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>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 <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" /> property to specify the name of the validation group for which the Update button in an <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object causes validation when it posts back to the server.</para> <para>The <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" /> property has an effect only when the value of the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> property is set to true. When you specify a value for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" /> property, only the validation controls that are part of the specified group are validated when the Update button in an <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object posts back to the server. If you do not specify a value for the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.ValidationGroup" /> property and the <see cref="P:System.Web.UI.WebControls.EditCommandColumn.CausesValidation" /> 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 <see cref="T:System.Web.UI.WebControls.EditCommandColumn" /> object posts back to the server.</para> <para>The value of this property is stored in view state.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>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.</para> </summary> </Docs> </Member> </Members> </Type>