Skip to main content
All docs

QueryBuilderClientSideEventsBuilder.OnServerError(String) Method

Specifies the JavaScript handler function for the OnServerError client-side event.

Namespace: DevExpress.AspNetCore.Reporting.QueryBuilder

Assembly: DevExpress.AspNetCore.Reporting.v23.1.dll

NuGet Package: DevExpress.AspNetCore.Reporting


public QueryBuilderClientSideEventsBuilder OnServerError(
    string callback


Name Type Description
callback String

The name of a JavaScript function or the entire JavaScript function code that handles the OnServerError event.


Type Description

A QueryBuilderClientSideEventsBuilder that can be used to further configure the Query Builder client-side events.


The OnServerError event is raised on the client each time an error occurs on the server.

A handler function receives two parameters: the first parameter is the client-side Query Builder object, the second is an object with the Error property that contains information about a server-side error.

The following code snippet demonstrates how to show an alert when an internal server error occurs:

@{ var queryBuilder = Html.DevExpress().QueryBuilder("webQueryBuilder")
                     .ClientSideEvents(configure =>
                     { configure.OnServerError("onError"); }); ; }
See Also