New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Migrating from RadTreeView for ASP.NET to ASP.NET AJAX

RadTreeView for ASP.NET AJAX contains a number of changes from moving to the ASP.NET Ajax framework and to the Telerik.Web.UI suite.These changes are listed below:

Client-Side Changes


RadTreeView Client-Side Object - "Classic" RadTreeView Client-Side Object for ASP.NET AJAX
FindNodeByText findNodeByText()
FindNodeByValue findNodeByValue()
FindNodeByAttribute findNodeByAttribute()
GetSelectedNodes get_selectedNodes()
UnSelectAllNodes unselectAllNodes()
UpdateState N/A (no longer required)
HideContextMenu N/A (other API will be provided for Context Menu handling)
Nodes get_nodes()The return value is no longer an Array. The return value is now a Telerik.Web.UI.RadTreeNodeCollection object.Enumerating Nodes:
AllNodes get_allNodes()The return value is Array.
ID get_id()
SelectedNode get_selectedNode()


RadTreeNode Client-Side Object - "Classic" RadTreeNode Client-Side Object for ASP.NET AJAX
Prev get_previousNode()
Next get_nextNode()
Expand set_expanded(true) or expand()
Collapse set_expanded(false) or collapse()
Toggle toggle()
Highlight highlight()
Select set_selected(true) or select()
UnSelect set_selected(false) or unselect()
Enable set_enabled(true) or enable()
Disable set_enabled(false) or disable()
Check set_checked(true) or check()
UnCheck set_checked(false) or uncheck()
StartEdit startEdit()
EndEdit endEdit()
CheckElement get_checkBoxElement()
ScrollIntoView scrollIntoView()
ImageElement get_imageElement()
TextElement get_textElement()
get_contentElement()Returns an HTML DOM element (a
  • tag) that represents a Tree Node.
  • Properties
    Text get_text()
    Value get_value()
    Category get_category()
    Enabled get_enabled()
    Expanded get_expanded()
    Checked get_checked()
    Selected get_selected()
    Nodes get_nodes()
    Parent get_parent()This method will return the RadTreeView if the Node is root Node.
    TreeView get_treeView()
    Attributes get_attributes(), getAttribute() and setAttribute()

    RadTreeNodeCollection New Methods

    See RadTreeNodeCollection Object for more details.

    RadTreeNodeCollection Client-Side Object for ASP.NET AJAX

    Server-Side Changes

    RadTreeView Changes

    RadTreeView - "Classic" RadTreeView for ASP.NET AJAX
    AfterClientFocus OnClientFocused
    BeforeClientContextMenu OnClientContextMenuShowing
    BeforeClientClick OnClientNodeClicking
    AfterClientClick OnClientNodeClicked
    AfterClientCallBackError OnClientCallbackError
    BeforeClientHighlight OnClientMouseOver
    AfterClientHighlight OnClientMouseOver
    BeforeClientDoubleClick OnClientDoubleClicking
    AfterClientMouseOut OnClientMouseOut
    AfterClientEdit OnClientNode
    BeforeClientDrop OnClientNodeDropping
    AfterClientDrop OnClientNodeDropped
    BeforeClientContextClick OnClientContextClicking
    BeforeClientCheck OnClientNodeChecking
    AfterClientCheck OnClientNodeChecked
    BeforeClientDrag OnClientNodeDragStart
    AfterClientMove OnClientNodeDragging
    AppendDataBoundNodes AppendDataBoundItems
    NodeBound NodeDataBound
    LoadingMessagePosition TreeViewLoadingStatusPosition

    RadTreeView Deleted Methods and Properties

    Deleted Method or Property Description
    ContentFile Use the LoadContentFile method instead.
    ContextMenuContentFile Replaced by newcontext menus
    AutoPostBack Postback appears as soon as you hook on any server event requiring postback
    AutoPostBackOnCheck Subscribing to the NodeCheck event will enable postback for checking operations
    GetContextMenusXml Replaced by newcontext menus
    LoadContextMenusXmlString Replaced by newcontext menus
    OnClientNodeToggling / Toggled Replaced by OnClientNodeExpanding, OnClientNodeExpanded, OnClientNodeCollapsing, OnClientNodeCollapsed events
    SSL Treeview output is SSL compliant by default
    ImagesBaseDir The user would specify the whole path
    RetainScrollPosition This feature is on by default
    IsCallback Use Page.IsCallBack instead
    LoadingMessageCssClass Now controlled by the skin css styles
    AfterClientFocus Use the 'onfocus' attribute for the same purpose.

    RadTreeView Changed Return Types


    Changed Return Type for Method Description
    GetAllNodes Returns IList instead of ArrayList
    CheckedNodes Returns IList instead of ArrayList
    SelectedNodes Returns IList instead of ArrayList


    RadTreeViewEventHandler has been split into other delegates:

    1. RadTreeViewEventHandler is used by the following events:

      • NodeClick
      • NodeDataBound
      • NodeCreated
      • NodeExpand
      • NodeCollapse
      • NodeCheck
    2. RadTreeViewDragDropEventHandler is used only by the NodeDrop event

    3. RadTreeViewEditEventHandler is used only by the NodeEdit event

    RadTreeNode Changes


    RadTreeNode - "Classic" RadTreeNode for ASP.NET AJAX
    CssClassSelect SelectedCssClass
    ImageExpandedUrl ExpandedImageUrl
    Parent ParentNode
    EditEnabled AllowEdit
    DragEnabled AllowDrag
    DropEnabled AllowDrop


    That class has been split into other classes:

    1. RadTreeNodeEventArgs contains only one property - Node. It is used by the following events:

      • NodeClick
      • NodeDataBound
      • NodeCreated
      • NodeExpand
      • NodeCollapse
      • NodeCheck
    2. RadTreeNodeDragDropEventArgs is used solely by the NodeDrop event. It contains the following properties:

      • SourceDragNode
      • DestDragNode
      • DropPosition
      • HtmlElementID
    3. RadTreeNodeEditEventArgs is used solely by the NodeEdit event. It contains the following properties

      • Node
      • Text
    In this article