All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

QueryBuilderClientSideEventsBuilder.OnServerError(String) Method

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

Namespace: DevExpress.AspNetCore.Reporting.QueryBuilder

Assembly: DevExpress.AspNetCore.Reporting.v21.2.dll

Declaration

public QueryBuilderClientSideEventsBuilder OnServerError(
    string callback
)

Parameters

Name Type Description
callback String

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

Returns

Type Description
QueryBuilderClientSideEventsBuilder

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

Remarks

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")
                     .Height("400px")
                     .Bind(Model)
                     .ClientSideEvents(configure =>
                     { configure.OnServerError("onError"); }); ; }
@queryBuilder
See Also