Skip to main content
A newer version of this page is available. .

ASPxClientGridView.GetValuesOnCustomCallback(args, onCallback) Method

Sends a callback to the server and generates the server-side ASPxGridView.CustomDataCallback event.

Declaration

GetValuesOnCustomCallback(
    args: string,
    onCallback: ASPxClientGridViewValuesCallback
): void

Parameters

Name Type Description
args string

Information that you need to send to the ASPxGridView.CustomDataCallback server-side event.

onCallback ASPxClientGridViewValuesCallback

A JavaScript function that receives the information on the client side.

Remarks

Use the GetValuesOnCustomCallback method to asynchronously go to the server and implement required actions on the server side using AJAX-based callback technology.

The method’s args parameter allows you to pass information to the server as a string of arguments. When operations are complete, the GetValuesOnCustomCallback method posts back to the server and generates the ASPxGridView.CustomDataCallback server-side event. Use the event’s ASPxGridCustomCallbackEventArgs.Parameters property to receive the passed parameter.

Use the onCallback parameter to specify a client-side function to pass the resulting information (ASPxGridCustomDataCallbackEventArgs.Result) to the client side.

<script language="javascript" type="text/javascript">
    function OnCategoryIDSelectedIndexChanged(s, e) {
        grid.GetValuesOnCustomCallback(s.GetValue(), OnGetValuesOnCustomCallbackComplete);
    }
    function OnGetValuesOnCustomCallbackComplete(values) {
        // your code
    }
</script>

<dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="grid"
    OnCustomDataCallback="ASPxGridView1_CustomDataCallback" >
    <Templates>
        <DetailRow>
            <dx:ASPxGridView ID="ASPxGridView2" ClientInstanceName="detailGrid" >
                <Columns>
                    ...
                    <dx:GridViewDataComboBoxColumn FieldName="CategoryID" ...>
                        <PropertiesComboBox>
                            <ClientSideEvents SelectedIndexChanged="OnCategoryIDSelectedIndexChanged" />
                        </PropertiesComboBox>
                    </dx:GridViewDataComboBoxColumn>
                    ...
                </Columns>
            </dx:ASPxGridView>
        </DetailRow>
    </Templates>
    ...
</dx:ASPxGridView>
See Also