Skip to main content

TreeListCustomDataCallbackEventArgs.Result Property

Gets or sets a value that contains specific information (if any) that needs to be passed to the client side for further processing.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public object Result { get; set; }

Property Value

Type Description
Object

An object that contains any information that needs to be sent to the client-side JavaScript function.

Remarks

The ASPxClientTreeList.PerformCustomDataCallback method posts back to the server using the callback technology, and generates a server-side ASPxTreeList.CustomDataCallback event.

After the callback is processed in the ASPxTreeList.CustomDataCallback event’s handler, the resulting information, specified by the Result property, can be passed back to the client side’s ASPxClientTreeList.CustomDataCallback event handler.

Example

This example shows how to display the number of selected nodes. The client-side ASPxClientTreeList.SelectionChanged event is handled to send a callback to the server to obtain the number of selected nodes. This information is set to the client (ASPxClientTreeList.CustomDataCallback event) and displayed below the ASPxTreeList.

The image below shows the result:

exCustomDataCallback

protected void ASPxTreeList1_CustomDataCallback(object sender,
DevExpress.Web.ASPxTreeList.TreeListCustomDataCallbackEventArgs e) {
    e.Result = ASPxTreeList1.SelectionCount.ToString();
}
See Also