Skip to main content

StaticJsonDataSourceBuilder.OnRemoving(RazorBlock) Method

A function that is executed before a data item is removed.

Namespace: DevExtreme.AspNet.Mvc.Builders.DataSources

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public StaticJsonDataSourceBuilder OnRemoving(
    RazorBlock jsFunc
)

Parameters

Name Type Description
jsFunc RazorBlock

The Razor @<text> block that contains JavaScript function code.

Returns

Type Description
StaticJsonDataSourceBuilder

A reference to this instance after the method is called.

Remarks

Use this method to specify a JavaScript handler for the client-side removing event.

@(Html.DevExtreme().DataGrid()
    .DataSource(d => d.StaticJson()
        .OnRemoving(@<text>
            function(e) {
                // Handler code
            }
        </text>)
    )
)

Refer to Read-Only Data in JSON Format for more information.

See Also