The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientGridView.StartEditRow(visibleIndex) Method

Switches the grid to edit mode.

Declaration

StartEditRow(visibleIndex: number): void

Parameters

Name Type Description
visibleIndex number

A zero-based integer that identifies a data row to be edited.

Remarks

Use the StartEditRow method to switch the GridView to edit mode in code. End-users can do this by clicking the Edit command item displayed within the command column.

Examples

This example shows how to switch ASPxGridView to an edit mode by double-clicking a data row. To do this, handle the ASPxClientGridView.RowDblClick client-side event and call the ASPxClientGridView.StartEditRow method.

<dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
    ClientInstanceName="grid" DataSourceID="AccessDataSource1" KeyFieldName="ProductID">
    <ClientSideEvents RowDblClick="function(s, e) {
        s.StartEditRow(e.visibleIndex);
    }" />
    <Columns>
        <dxwgv:GridViewDataTextColumn FieldName="ProductID" ReadOnly="True" VisibleIndex="0">
            <EditFormSettings Visible="False" />
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="ProductName" VisibleIndex="1">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="UnitPrice" VisibleIndex="2">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="UnitsOnOrder" VisibleIndex="3">
        </dxwgv:GridViewDataTextColumn>
    </Columns>
</dxwgv:ASPxGridView>
See Also