Back to Devexpress

ASPxTreeList Class

aspnet-devexpress-dot-web-dot-aspxtreelist.md

latest8.0 KB
Original Source

ASPxTreeList Class

Represents a server ASPxTreeList control.

Namespace : DevExpress.Web.ASPxTreeList

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

NuGet Package : DevExpress.Web

Declaration

csharp
public class ASPxTreeList :
    ASPxDataWebControl,
    IWebColumnsOwner,
    IPagerOwner,
    IControlDesigner,
    IBasePrintable,
    ITreeListExportOwner,
    IPopupFilterControlOwner,
    IFilterControlRowOwner,
    IFilterControlOwner,
    IPopupFilterControlStyleOwner,
    IHeaderFilterPopupOwner,
    ISkinOwner,
    IPropertiesOwner,
    IFilterHelperOwner,
    IBatchEditHelperOwner,
    IPostBackValueSecureValidationOwner,
    ITreeListDataGuardInfoProvider,
    IDataGuardInfoProvider
vb
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:

LibraryRelated API Members
ASP.NET Web Forms ControlsASPxTreeListExporter.TreeList
TreeListColumn.TreeList
TreeListColumnCollection.TreeList
TreeListTemplateContainerBase.TreeList
ASP.NET MVC ExtensionsMVCxTreeListExporter.TreeList

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

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.

Example

In markup:

aspx
<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:

aspx
<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>
csharp
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

Show 16 items

IComponent

IDisposable

IParserAccessor

IDataBindingsAccessor

IControlBuilderAccessor

IControlDesignerAccessor

IExpressionsAccessor

IAttributeAccessor

IUrlResolutionService

INamingContainer

IPostBackDataHandler

IPostBackEventHandler

ICallbackEventHandler

IDataSourceViewSchemaAccessor

IBasePrintable

IPropertiesOwner

Inheritance

Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxDataWebControlBase ASPxDataWebControl ASPxTreeList MVCxTreeList

See Also

ASPxTreeList Members

Tree Generation Algorithm in the ASPxTreeList

Tree List

DevExpress.Web.ASPxTreeList Namespace