Skip to main content
Tab

ASPxTreeView.EnableCallBacks Property

Gets or sets a value that specifies whether the callback technology is used to transfer the requested nodes from the server if the AutoPostBack property is set to false.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

[DefaultValue(false)]
public bool EnableCallBacks { get; set; }

Property Value

Type Default Description
Boolean false

true if round trips to the server are performed using callbacks; false if the callback technology isn’t used.

Remarks

The ASPxTreeView control supports AJAX technology by implementing the ability to load the content of an ASPxTreeView from the server via a callback. This approach allows the ASPxTreeView to avoid the initial transfer of all its node’s data to the client, optimizing the page’s load time.

In order to enable the use of callbacks, its EnableCallBacks property should be set to true. In this instance, the contents of the collapsed nodes are not represented on the client. When a node is expanded for the first time, its content is retrieved from the server and then cached on the client. The next time the node is expanded, its content is taken from the client and no callback to the server is performed.

If the EnableCallBacks and AutoPostBack properties are set to false, the ASPxTreeView control works in the so called “client mode”. In this mode, all its nodes (expanded and collapsed) are sent to the client during the first response, and active page alteration is performed on the client side without generating any round-trip to the server. In this situation, you can utilize the control’s client-side object model (client events and methods) to respond to client-side manipulations.

Note

Setting the EnableCallBacks is in effect only if the ASPxTreeView.AutoPostBack is set to false.

Example

The code below demonstrates how you can change the AutoPostBack and EnableCallBacks options values.

protected void CheckBox1_CheckedChanged(object sender, EventArgs e) {
     ASPxTreeView1.AutoPostBack = CheckBox1.Checked;
}
protected void CheckBox2_CheckedChanged(object sender, EventArgs e) {
     ASPxTreeView1.EnableCallBacks = CheckBox2.Checked;
}
See Also