Skip to main content

ASPxClientWebChartControl.PerformCallback(args) Method

Sends a callback to the server and generates the server-side event, passing it the specified argument.

Declaration

PerformCallback(
    args: string,
    onSuccess?: (arg: string) => void
): void

Parameters

Name Type Description
args string

A string value that contains information that needs to be sent to the server-side event.

onSuccess (arg: string) => void

A client action to perform if the server round-trip completed successfully.

Remarks

Call the PerformCallback method if you need to asynchronously go to the server and use AJAX-based callback technology to perform actions. Use the PerformCallback method’s args parameter to pass the required information as a string of arguments. The onSuccess parameter allows you to specify a client function that should be executed after the server round-trip completes successfully.

The following code calls the PerformCallback method on each tick of a timer:

<dxt:ASPxTimer ID="tmTimer" runat="server" Interval="1000">
    <ClientSideEvents Tick="function(s, e) {
                            chart.PerformCallback(&quot;test&quot;);
                        }" />
</dxt:ASPxTimer>

For the complete code sample, refer to the following page: How to: Use Callbacks to Update a WebChartControl Dynamically.

See Also