[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Collapse]Tree List
   [Expand]Product Information
   [Expand]Concepts
   [Expand]Visual Elements
   [Collapse]Examples
     How to: Add New Nodes in Code (Bound Mode)
     How to: Bind the ASPxTreeList to Data Created at Runtime
     How to: Calculate Custom Summaries
     How to: Create a Tree in Code (Unbound Mode)
     How to: Create Custom Command Buttons
     How to: Delete Selected Nodes
     How to: Display Summaries
     How to: Display the Customization Window
     How to: Display the File/Folder Tree (Virtual Mode)
     How to: Enable Recursive Selection When Binding at Runtime
     How to: Implement Conditional Formatting
     How to: Init New Nodes
     How to: Initialize Cell Editors
     How to: Obtain Server Data From the Client
     How to: Perform Drag And Drop in Virtual Mode
     How to: Present Data in Cards
     How to: Provide a Context Menu
     How to: Save And Restore the ASPxTreeList's Layout
     How to: Select Nodes That Meet the Specified Criteria
     How to: Sort Nodes Using Custom Rules
     How to: Use the Nodes Iterator
     How to: Validate Edit Form Template Container
     How to: Validate Nodes (Server-Side)
   [Expand]Member Tables
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Sort Nodes Using Custom Rules

The following code shows how to implement custom node sorting by handling the ASPxTreeList.CustomNodeSort event. The "DEPARTMENT" column displays text values. When sorting is applied to this column, the nodes are compared by the length of the "DEPARTMENT" column's values rather than by the text itself.

The image below shows the result:

Is this topic helpful?​​​​​​​