dashboard-js-devexpress-dot-dashboard-5b2540f2.md
Provides options for customizing the AjaxRemoteService.
export interface AjaxRemoteServiceOptions
The Ajax remote service is a default IRemoteService<TResponse> implementation that exchanges information between client and server sides. You can get different information from a server (data sources, export information, a dashboard model), obtain a dashboard request time, pass custom HTTP headers and so much more.
Refer to the following topics for information on how to set the server’s URL and pass a custom Authorization header from the client:
Specifies a pre-request callback function that can be used to modify the JQueryXHR object before it is sent.
beforeSend?: (jqXHR: JQueryXHR, settings: JQueryAjaxSettings) => any
| Type | Description |
|---|---|
| (jqXHR: JQueryXHR, settings: JQueryAjaxSettings) => any |
A function that can be used to modify the JQueryXHR object before it is sent.
|
Specifies a function to be called when the request finishes (after success and error callbacks are executed).
complete?: (jqXHR: JQueryXHR, textStatus: string) => any
| Type | Description |
|---|---|
| (jqXHR: JQueryXHR, textStatus: string) => any |
A function to be called when the request finishes.
|
Specifies an object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport.
headers?: {
[key: string]: any;
}
| Type | Description |
|---|---|
| [key: string]: any |
A collection of header key/value pairs.
|
Note
The client-side dashboard control uses form.submit to export the entire dashboard or a dashboard item. This approach doesn’t allow the application to send HTTP headers from client to server side. In this case, the dashboard control adds the <input type="hidden"> element to the form for each HTTP header from the headers collection. The hidden input element has the same ID as the HTTP header’s name. The header value is sent to the server side as the value of the corresponding field. You can use the HttpRequest.Form collection to access the hidden fields’ values on the server side.