Skip to main content

DxDataGrid<T>.StartRowEdit(Object) Method

Asynchronously displays the edit form for the specified data row or a new row.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public Task StartRowEdit(
    object dataItem


Name Type Description
dataItem Object

A data item that corresponds to the data row. Pass null to invoke the edit form for a new data row.


Type Description

An asynchronous operation that invokes the edit form.



The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

Use the StartRowEdit method to edit/insert a row in the Data Grid from code. This method allows you to implement custom edit buttons inside any Data Grid cell or outside the Data Grid.

<button id="newRowButton" @onclick="@NewRow">New Row</button>
<button id="editRowButton" @onclick="@EditRow">Edit Row</button>

<DxDataGrid DataAsync="@ForecastService.GetForecastAsync"
            @bind-SingleSelectedDataRow="@selectedForecast" ...>
        <DxDataGridColumn Field=@nameof(WeatherForecast.TemperatureC) Caption="Temp. (C)"></DxDataGridColumn>

@functions {
    DevExpress.Blazor.DxDataGrid<WeatherForecast> MyGrid;
    WeatherForecast selectedForecast;

    async Task EditRow() {
        if (selectedForecast != null) {
            await MyGrid.StartRowEdit(selectedForecast);

    async Task NewRow() {
        await MyGrid.StartRowEdit(null);

When you call the StartRowEdit method to edit a data row, the RowEditStart and RowEditStartAsync event fire. When you call this method to add a new row, the RowInsertStart and RowInsertStartAsync event occur.

See Also