The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientGridView.PerformCallback(args) Method

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

Declaration

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

Parameters

Name Type Description
args string

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

Optional Parameters

Name Type Default Description
onSuccess (arg: string) => void null

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

Remarks

Use the PerformCallback method if you need to asynchronously go to the server and perform server-side processing using AJAX-based callback technology. You can pass the required information which can be collected on the client side as a string of arguments using the PerformCallback method args parameter. The onSuccess parameter allows you to specify a client function that should be executed after the server round-trip completed successfully.

Examples

The following example illustrates how to use two grid views to display master-detail data.

<dx:ASPxGridView ID="masterGrid" runat="server" ...>
    <SettingsBehavior AllowFocusedRow="True" />
    <Columns>
        <dx:GridViewDataTextColumn FieldName="CategoryID" ReadOnly="True" VisibleIndex="0">
            <EditFormSettings Visible="False" />
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="2">
        </dx:GridViewDataTextColumn>
    </Columns>
    <ClientSideEvents FocusedRowChanged="function(s, e) {
        dGrid.PerformCallback(s.GetFocusedRowIndex());
        }" />
</dx:ASPxGridView>
<br/>
<dx:ASPxGridView ID="detailGrid" runat="server" ClientInstanceName="dGrid" OnCustomCallback="detailGrid_CustomCallback" ...>
    <Columns>
        <dx:GridViewDataTextColumn FieldName="ProductID" ReadOnly="True" Visible="False"
            VisibleIndex="0">
            <EditFormSettings Visible="False" />
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="ProductName" VisibleIndex="0">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="UnitPrice" VisibleIndex="1">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="UnitsInStock" VisibleIndex="2">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="QuantityPerUnit" VisibleIndex="3">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="CategoryID" Visible="False" VisibleIndex="5">
        </dx:GridViewDataTextColumn>
    </Columns>
</dx:ASPxGridView>

See Also