Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Collapse]API Reference
  [Expand]DevExpress.Data.Linq
  [Expand]DevExpress.Web
  [Expand]DevExpress.Web.ASPxGauges
  [Expand]DevExpress.Web.ASPxGauges.Base
  [Expand]DevExpress.Web.ASPxGauges.Scripts
  [Expand]DevExpress.Web.ASPxHtmlEditor
  [Expand]DevExpress.Web.ASPxHtmlEditor.Localization
  [Expand]DevExpress.Web.ASPxHtmlEditor.Scripts
  [Expand]DevExpress.Web.ASPxPivotGrid
  [Expand]DevExpress.Web.ASPxPivotGrid.Data
  [Expand]DevExpress.Web.ASPxPivotGrid.HtmlControls
  [Expand]DevExpress.Web.ASPxPivotGrid.Scripts
  [Expand]DevExpress.Web.ASPxRichEdit
  [Expand]DevExpress.Web.ASPxRichEdit.Localization
  [Expand]DevExpress.Web.ASPxRichEdit.Scripts
  [Expand]DevExpress.Web.ASPxScheduler
  [Expand]DevExpress.Web.ASPxScheduler.Commands.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Controls
  [Expand]DevExpress.Web.ASPxScheduler.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Drawing
  [Expand]DevExpress.Web.ASPxScheduler.Localization
  [Expand]DevExpress.Web.ASPxScheduler.Reporting
  [Expand]DevExpress.Web.ASPxScheduler.Scripts
  [Expand]DevExpress.Web.ASPxSpellChecker
  [Expand]DevExpress.Web.ASPxSpellChecker.Localization
  [Expand]DevExpress.Web.ASPxSpellChecker.Scripts
  [Expand]DevExpress.Web.ASPxSpreadsheet
  [Expand]DevExpress.Web.ASPxSpreadsheet.Localization
  [Expand]DevExpress.Web.ASPxSpreadsheet.Scripts
  [Collapse]DevExpress.Web.ASPxTreeList
   [Expand]ASPxTreeList Class
   [Expand]ASPxTreeListAutoFilterEventArgs Class
    ASPxTreeListAutoFilterEventHandler Delegate
   [Expand]ASPxTreeListBeforeHeaderFilterFillItemsEventArgs Class
    ASPxTreeListBeforeHeaderFilterFillItemsEventHandler Delegate
   [Expand]ASPxTreeListEditorCreateEventArgs Class
    ASPxTreeListEditorCreateEventHandler Delegate
   [Expand]ASPxTreeListEditorEventArgs Class
    ASPxTreeListEditorEventHandler Delegate
   [Expand]ASPxTreeListExporter Class
   [Expand]ASPxTreeListExportRenderBrickEventArgs Class
   [Expand]ASPxTreeListHeaderFilterEventArgs Class
    ASPxTreeListHeaderFilterEventHandler Delegate
   [Expand]ASPxTreeListOnClickRowFilterEventArgs Class
    ASPxTreeListOnClickRowFilterEventHandler Delegate
   [Expand]ASPxTreeListPrintSettings Class
    ASPxTreeListRenderBrickEventHandler Delegate
   [Expand]ASPxTreeListSearchPanelEditorCreateEventArgs Class
    ASPxTreeListSearchPanelEditorCreateEventHandler Delegate
   [Expand]ASPxTreeListSearchPanelEditorEventArgs Class
    ASPxTreeListSearchPanelEditorEventHandler Delegate
   [Expand]ASPxTreeListTemplateReplacement Class
   [Expand]PageMargins Class
   [Expand]PageSettings Class
   [Expand]ReadOnlyTreeListColumnCollection<T> Class
   [Expand]TreeListAlternatingNodeStyle Class
   [Expand]TreeListBinaryImageColumn Class
   [Expand]TreeListButtonEditColumn Class
   [Expand]TreeListCellStyle Class
   [Expand]TreeListCellTemplateContainerBase Class
   [Expand]TreeListCheckColumn Class
   [Expand]TreeListClientSideEvents Class
   [Expand]TreeListColorEditColumn Class
   [Expand]TreeListColumn Class
   [Expand]TreeListColumnCollection Class
   [Expand]TreeListColumnDateRangeCalendarSettings Class
   [Expand]TreeListColumnDateRangePeriodsSettings Class
   [Expand]TreeListColumnDateRangePickerSettings Class
   [Expand]TreeListColumnDisplayTextEventArgs Class
    TreeListColumnEditCaptionLocation Enumeration
   [Expand]TreeListColumnEditFormSettings Class
   [Expand]TreeListColumnEditorEventArgs Class
    TreeListColumnEditorEventHandler Delegate
   [Expand]TreeListColumnSettingsHeaderFilter Class
    TreeListColumnSortMode Enumeration
   [Expand]TreeListComboBoxColumn Class
   [Expand]TreeListCommandCellStyle Class
   [Expand]TreeListCommandColumn Class
   [Expand]TreeListCommandColumnApplyFilterButton Class
   [Expand]TreeListCommandColumnButton Class
   [Expand]TreeListCommandColumnButtonEventArgs Class
    TreeListCommandColumnButtonEventHandler Delegate
    TreeListCommandColumnButtonType Enumeration
   [Expand]TreeListCommandColumnCancelButton Class
   [Expand]TreeListCommandColumnClearFilterButton Class
   [Expand]TreeListCommandColumnCustomButton Class
   [Expand]TreeListCommandColumnCustomButtonCollection Class
   [Expand]TreeListCommandColumnUpdateButton Class
    TreeListCustomButtonVisibility Enumeration
   [Expand]TreeListCustomCallbackEventArgs Class
    TreeListCustomCallbackEventHandler Delegate
    TreeListCustomColumnDisplayTextEventHandler Delegate
   [Expand]TreeListCustomDataCallbackEventArgs Class
    TreeListCustomDataCallbackEventHandler Delegate
   [Expand]TreeListCustomErrorTextEventArgs Class
    TreeListCustomErrorTextEventHandler Delegate
   [Expand]TreeListCustomFilterNodeEventArgs Class
    TreeListCustomFilterNodeEventHandler Delegate
   [Expand]TreeListCustomizationWindowPopupSettings Class
   [Expand]TreeListCustomizationWindowPopupStyle Class
   [Expand]TreeListCustomJSPropertiesEventArgs Class
    TreeListCustomJSPropertiesEventHandler Delegate
   [Collapse]TreeListCustomNodeSortEventArgs Class
     TreeListCustomNodeSortEventArgs Members
     TreeListCustomNodeSortEventArgs Constructor
    [Expand]TreeListCustomNodeSortEventArgs Properties
    TreeListCustomNodeSortEventHandler Delegate
   [Expand]TreeListCustomSummaryEventArgs Class
    TreeListCustomSummaryEventHandler Delegate
   [Expand]TreeListCustomUnboundColumnDataEventArgs Class
    TreeListCustomUnboundColumnDataEventHandler Delegate
    TreeListDataCacheMode Enumeration
   [Expand]TreeListDataCellTemplateContainer Class
   [Expand]TreeListDataColumn Class
   [Expand]TreeListDateTimeColumn Class
   [Expand]TreeListDropDownEditColumn Class
   [Expand]TreeListEditCellTemplateContainer Class
   [Expand]TreeListEditDataColumn Class
   [Expand]TreeListEditFormTemplateContainer Class
    TreeListEditFormTemplateReplacementType Enumeration
    TreeListEditingOperation Enumeration
   [Expand]TreeListEditingOperationEventArgs Class
    TreeListEditingOperationEventHandler Delegate
    TreeListEditMode Enumeration
    TreeListExpandCollapseAction Enumeration
   [Expand]TreeListExportAppearance Class
   [Expand]TreeListExportStyles Class
   [Expand]TreeListExportSystemStyles Class
   [Expand]TreeListFilterBuilderPopupStyle Class
   [Expand]TreeListFilterCellStyle Class
   [Expand]TreeListFilterCellTemplateContainer Class
   [Expand]TreeListFilterControlPopupSettings Class
   [Expand]TreeListFilterNodeIterator Class
   [Expand]TreeListFilterRowStyle Class
   [Expand]TreeListFilterRowTemplateContainer Class
   [Expand]TreeListFooterCellTemplateContainer Class
   [Expand]TreeListFooterStyle Class
   [Expand]TreeListHeaderFilterPopupSettings Class
   [Expand]TreeListHeaderFilterPopupStyle Class
   [Expand]TreeListHeaderStyle Class
   [Expand]TreeListHeaderTemplateContainer Class
   [Expand]TreeListHtmlCommandCellEventArgs Class
    TreeListHtmlCommandCellEventHandler Delegate
   [Expand]TreeListHtmlDataCellEventArgs Class
    TreeListHtmlDataCellEventHandler Delegate
   [Expand]TreeListHtmlRowEventArgs Class
    TreeListHtmlRowEventHandler Delegate
   [Expand]TreeListHyperLinkColumn Class
   [Expand]TreeListImageColumn Class
   [Expand]TreeListImages Class
   [Expand]TreeListIndentStyle Class
   [Expand]TreeListIndentStyleBase Class
   [Expand]TreeListMemoColumn Class
   [Expand]TreeListNode Class
   [Expand]TreeListNodeCancelEventArgs Class
    TreeListNodeCancelEventHandler Delegate
   [Expand]TreeListNodeCollection Class
   [Expand]TreeListNodeDragEventArgs Class
    TreeListNodeDragEventHandler Delegate
   [Expand]TreeListNodeEditingEventArgs Class
    TreeListNodeEditingEventHandler Delegate
   [Expand]TreeListNodeEventArgs Class
    TreeListNodeEventHandler Delegate
   [Expand]TreeListNodeIterator Class
   [Expand]TreeListNodeStyle Class
   [Expand]TreeListNodeValidationEventArgs Class
    TreeListNodeValidationEventHandler Delegate
    TreeListPagerMode Enumeration
   [Expand]TreeListPagerPanelStyle Class
   [Expand]TreeListPopupControlSettings Class
   [Expand]TreeListPopupControlStyle Class
   [Expand]TreeListPopupControlStyles Class
   [Expand]TreeListPopupEditFormStyle Class
   [Expand]TreeListPreviewTemplateContainer Class
   [Expand]TreeListProgressBarColumn Class
    TreeListRowKind Enumeration
   [Expand]TreeListSettings Class
   [Expand]TreeListSettingsBase Class
   [Expand]TreeListSettingsBehavior Class
   [Expand]TreeListSettingsCookies Class
   [Expand]TreeListSettingsCustomizationWindow Class
   [Expand]TreeListSettingsDataSecurity Class
   [Expand]TreeListSettingsEditing Class
   [Expand]TreeListSettingsExport Class
   [Expand]TreeListSettingsFilterControl Class
   [Expand]TreeListSettingsLoadingPanel Class
   [Expand]TreeListSettingsPager Class
   [Expand]TreeListSettingsPopupEditForm Class
   [Expand]TreeListSettingsResizing Class
   [Expand]TreeListSettingsSearchPanel Class
   [Expand]TreeListSettingsSelection Class
   [Expand]TreeListSettingsText Class
   [Expand]TreeListSpinEditColumn Class
   [Expand]TreeListStyles Class
   [Expand]TreeListSummaryCollection Class
   [Expand]TreeListSummaryItem Class
   [Expand]TreeListTemplateContainerBase Class
   [Expand]TreeListTemplates Class
   [Expand]TreeListTextColumn Class
   [Expand]TreeListTimeEditColumn Class
   [Expand]TreeListTokenBoxColumn Class
   [Expand]TreeListToolbar Class
   [Expand]TreeListToolbarCollection Class
    TreeListToolbarCommand Enumeration
   [Expand]TreeListToolbarItem Class
   [Expand]TreeListToolbarItemClickEventArgs Class
    TreeListToolbarItemClickEventHandler Delegate
   [Expand]TreeListToolbarItemCollection Class
   [Expand]TreeListTreeLineStyle Class
   [Expand]TreeListVirtualModeCreateChildrenEventArgs Class
    TreeListVirtualModeCreateChildrenEventHandler Delegate
   [Expand]TreeListVirtualModeNodeCreatingEventArgs Class
    TreeListVirtualModeNodeCreatingEventHandler Delegate
   [Expand]TreeListVirtualNodeEventArgs Class
    TreeListVirtualNodeEventHandler Delegate
  [Expand]DevExpress.Web.ASPxTreeList.Internal
  [Expand]DevExpress.Web.ASPxTreeList.Localization
  [Expand]DevExpress.Web.ASPxTreeList.Scripts
  [Expand]DevExpress.Web.Captcha
  [Expand]DevExpress.Web.Data
  [Expand]DevExpress.Web.Internal
  [Expand]DevExpress.Web.Localization
  [Expand]DevExpress.Web.Mvc
  [Expand]DevExpress.Web.Mvc.BinderSettings
  [Expand]DevExpress.Web.Mvc.Controllers
  [Expand]DevExpress.Web.MVC.Scripts
  [Expand]DevExpress.Web.Mvc.UI
  [Expand]DevExpress.Web.Office
  [Expand]DevExpress.Web.Office.Internal
  [Expand]DevExpress.Web.Rendering
  [Expand]DevExpress.Web.Scripts
  [Expand]DevExpress.XtraCharts.Web
  [Expand]DevExpress.XtraCharts.Web.Designer
  [Expand]DevExpress.XtraCharts.Web.Scripts
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

TreeListCustomNodeSortEventArgs Class

Provides data for the ASPxTreeList.CustomNodeSort event.

Namespace:DevExpress.Web.ASPxTreeList
Assembly:DevExpress.Web.ASPxTreeList.v17.2.dll

Expanded Syntax

Expanded Remarks

The ASPxTreeList.CustomNodeSort event is raised when sorting is applied to a column, and allows a custom sorting algorithm to be implemented.

In an event handler two nodes should be compared. The result of the custom comparison indicates whether one node should be positioned above or below another node. To set the result of the custom comparison, use the Result property.

The nodes being processed are specified by the Node1 and Node2 properties. To retrieve node values, use the node's TreeListNode.GetValue method. The processed column is returned by the Column property.

In most instances the Handled parameter should be set to true, to indicate that the comparison operation was handled and therefore no default processing is required. If the parameter is left set to false, the default comparison mechanism will be invoked after your event handler has been called, and this will override the custom result.

Expanded Example

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:

Expanded Inheritance Hierarchy

System.Object
    System.EventArgs
       TreeListCustomNodeSortEventArgs

Expanded See Also

How would you rate this topic?​​​​​​​