Skip to main content

ASPxClientGridView.GetEditValue(column) Method

Returns the value of the specified edit cell.

Declaration

GetEditValue(
    column: ASPxClientGridViewColumn | number | string
): string

Parameters

Name Type Description
column string | number | ASPxClientGridViewColumn

The data column | The column’s index | The column’s fieldName

Returns

Type Description
string

The value of the specified edit cell.

Remarks

Call the grid’s client-side GetEditValue method to obtain the value of the specified edit cell.

The following example demonstrates how to calculate a value in code based on column values and assign the calculated value to an editor within the Grid View edit form:

View Example: How to assign calculated values to the Edit Form on the client and server sides

Follow the steps below:

  1. Handle the client-side ValueChanged event.

    <dx:GridViewDataSpinEditColumn FieldName="UnitPrice" >
        <PropertiesSpinEdit>
            <ClientSideEvents ValueChanged="OnEditorValueChanged" />
        </PropertiesSpinEdit>
    </dx:GridViewDataSpinEditColumn>
    <dx:GridViewDataSpinEditColumn FieldName="UnitsInStock" >
        <PropertiesSpinEdit>
            <ClientSideEvents ValueChanged="OnEditorValueChanged" />
        </PropertiesSpinEdit>
    </dx:GridViewDataSpinEditColumn>
    <dx:GridViewDataTextColumn FieldName="Total" ReadOnly="true" UnboundType="Decimal" />
    
  2. In the handler, call the grid’s GetEditValue method to obtain the editor value and the grid’s SetEditValue(column, value) method to assign the new value to the specified cell within the edit form.

    function OnEditorValueChanged(s, e) {
        var unitPrice = grid.GetEditValue("UnitPrice");
        var unitsInStock = grid.GetEditValue("UnitsInStock");
        grid.SetEditValue("Total", unitPrice * unitsInStock);
    }
    
See Also