ASPxTreeList Class
Represents a server ASPxTreeList control.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
public class ASPxTreeList :
ASPxDataWebControl,
IWebColumnsOwner,
IPagerOwner,
IControlDesigner,
IBasePrintable,
ITreeListExportOwner,
IPopupFilterControlOwner,
IFilterControlRowOwner,
IFilterControlOwner,
IPopupFilterControlStyleOwner,
IHeaderFilterPopupOwner,
ISkinOwner,
IPropertiesOwner,
IFilterHelperOwner,
IBatchEditHelperOwner,
IPostBackValueSecureValidationOwner,
ITreeListDataGuardInfoProvider,
IDataGuardInfoProvider
Remarks
The ASPxTreeList is a multi-purpose data visualization control that can display information as a tree or grid - either in data-bound or unbound mode.
The ASPxTreeList provides the following key features
- Data Binding
- Summary Computation
- Data Paging
- Node Selection
- Appearance Customization
- Templates, etc.
Note
The ASPxTreeList control provides you with a comprehensive client-side functionality implemented using JavaScript code:
- The control’s client-side equivalent is represented by the ASPxClientTreeList object.
- On the client side, the client object can be accessed directly by the name specified via the ASPxTreeList.ClientInstanceName property.
- The available client events can be accessed by using the ASPxTreeList.ClientSideEvents property.
The client-side API is always available for this control.
Example
In markup:
<dx:ASPxTreeList ID="ASPxTreeList1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ProductID">
<Columns>
<dx:TreeListTextColumn AutoFilterCondition="Default" FieldName="ProductName" ShowInFilterControl="Default" VisibleIndex="0">
</dx:TreeListTextColumn>
<dx:TreeListTextColumn AutoFilterCondition="Default" FieldName="UnitPrice" ShowInFilterControl="Default" VisibleIndex="1">
</dx:TreeListTextColumn>
</Columns>
</dx:ASPxTreeList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Docs\DB\nwind.mdb"
ProviderName="System.Data.OleDb" SelectCommand="SELECT [ProductID], [ProductName], [UnitPrice] FROM [Products]">
</asp:SqlDataSource>
Programmatically:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Docs\DB\nwind.mdb"
ProviderName="System.Data.OleDb" SelectCommand="SELECT [ProductID], [ProductName], [UnitPrice] FROM [Products]">
</asp:SqlDataSource>
using DevExpress.Web.ASPxTreeList;
protected void Page_Load(object sender, EventArgs e)
{
ASPxTreeList treeList = new ASPxTreeList();
treeList.ID = "ASPxTreeList1";
Page.Form.Controls.Add(treeList);
treeList.Columns.Add(new TreeListDataColumn("ProductID"));
treeList.Columns.Add(new TreeListDataColumn("ProductName"));
treeList.Columns.Add(new TreeListDataColumn("UnitPrice"));
treeList.AutoGenerateColumns = false;
treeList.KeyFieldName = "ProductID";
treeList.DataSourceID = "SqlDataSource1";
treeList.DataBind();
}
Implements
Inheritance
See Also