Back to Devexpress

ASPxClientWebChartControl.PerformCallback(args) Method

aspnet-js-aspxclientwebchartcontrol-dot-performcallback-x28-args-x29.md

latest1.7 KB
Original Source

ASPxClientWebChartControl.PerformCallback(args) Method

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

Declaration

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

Parameters

NameTypeDescription
argsstring

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:

aspx
<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

Callbacks

ASPxClientWebChartControl Class

ASPxClientWebChartControl Members