aspnet-devexpress-dot-web-dot-aspxtreelist.md
Represents a server ASPxTreeList control.
Namespace : DevExpress.Web.ASPxTreeList
Assembly : DevExpress.Web.ASPxTreeList.v25.2.dll
NuGet Package : DevExpress.Web
public class ASPxTreeList :
ASPxDataWebControl,
IWebColumnsOwner,
IPagerOwner,
IControlDesigner,
IBasePrintable,
ITreeListExportOwner,
IPopupFilterControlOwner,
IFilterControlRowOwner,
IFilterControlOwner,
IPopupFilterControlStyleOwner,
IHeaderFilterPopupOwner,
ISkinOwner,
IPropertiesOwner,
IFilterHelperOwner,
IBatchEditHelperOwner,
IPostBackValueSecureValidationOwner,
ITreeListDataGuardInfoProvider,
IDataGuardInfoProvider
Public Class ASPxTreeList
Inherits ASPxDataWebControl
Implements IWebColumnsOwner,
IPagerOwner,
IControlDesigner,
IBasePrintable,
ITreeListExportOwner,
IPopupFilterControlOwner,
IFilterControlRowOwner,
IFilterControlOwner,
IPopupFilterControlStyleOwner,
IHeaderFilterPopupOwner,
ISkinOwner,
IPropertiesOwner,
IFilterHelperOwner,
IBatchEditHelperOwner,
IPostBackValueSecureValidationOwner,
ITreeListDataGuardInfoProvider,
IDataGuardInfoProvider
The following members return ASPxTreeList objects:
| Library | Related API Members |
|---|---|
| ASP.NET Web Forms Controls | ASPxTreeListExporter.TreeList |
| TreeListColumn.TreeList | |
| TreeListColumnCollection.TreeList | |
| TreeListTemplateContainerBase.TreeList | |
| ASP.NET MVC Extensions | MVCxTreeListExporter.TreeList |
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
Note
The ASPxTreeList control provides you with a comprehensive client-side functionality implemented using JavaScript code:
The client-side API is always available for this control.
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();
}
Show 16 items
Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxDataWebControlBase ASPxDataWebControl ASPxTreeList MVCxTreeList
See Also