Search code examples
.netdevexpresstreelist

how to databind to DevExpress TreeList


i want to databind hierarchical data from plain data to the ASPxTreeList, i checked the documentation online for the the databinding, this is the code i found:

 Imports Microsoft.VisualBasic
 Imports System

 Partial Public Class Data_Hierarchical
     Inherits BasePage
     Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
         If (Not IsPostBack) Then
             DataBind()
             treeList.ExpandToLevel(1)
         End If
     End Sub
 End Class

but how DataBind() is implemented?


Solution

  • The DataBind is a method of the System.Web.UI.Control class and it is described in MSDN:

    Control.DataBind

    In fact, we override this method in our code the way similar to the one described in the MSDN.