ASPxClientGridView.SetEditValue(column, value) Method
Sets the value of the specified edit cell.
Declaration
SetEditValue(
column: ASPxClientGridViewColumn | number | string,
value: string
): void
Parameters
Name | Type | Description |
---|---|---|
column | string | number | ASPxClientGridViewColumn | The data column | The column’s index | The column’s fieldName |
value | string | The new value of the specified edit cell. |
Remarks
The SetEditValue
method allows you to assign a new value to the specified edit cell. For template editors, use the editor’s Name
or ClientInstanceName
parameter to specify its value.
The code sample below replaces the value of the ContactName edit cell when a user changes the value of the CompanyName edit cell.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="CustomerID" ClientInstanceName="grid">
<Columns>
<dx:GridViewCommandColumn ShowDeleteButton="True" ShowEditButton="True" ShowNewButtonInHeader="True" VisibleIndex="0">
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="CompanyName" VisibleIndex="1">
<PropertiesTextEdit>
<ClientSideEvents ValueChanged="OnValueChanged" />
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="ContactName" VisibleIndex="2" />
</Columns>
<SettingsEditing Mode="Inline" />
</dx:ASPxGridView>
function OnValueChanged(s, e) {
grid.SetEditValue("ContactName", "Check the company name");
}
See Also