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
   [Collapse]ASPxTreeList Class
     ASPxTreeList Members
     ASPxTreeList Constructor
    [Expand]ASPxTreeList Properties
    [Collapse]ASPxTreeList Events
      AutoFilterCellEditorCreate Event
      AutoFilterCellEditorInitialize Event
      BeforeGetCallbackResult Event
      BeforeHeaderFilterFillItems Event
      CancelNodeEditing Event
      CellEditorInitialize Event
      ClientLayout Event
      CommandColumnButtonInitialize Event
      CustomCallback Event
      CustomColumnDisplayText Event
      CustomDataCallback Event
      CustomErrorText Event
      CustomFilterExpressionDisplayText Event
      CustomFilterNode Event
      CustomJSProperties Event
      CustomNodeSort Event
      CustomSummaryCalculate Event
      CustomUnboundColumnData Event
      EditingOperationCompleted Event
      ExportRenderBrick Event
      FilterControlColumnsCreated Event
      FilterControlCriteriaValueEditorCreate Event
      FilterControlCriteriaValueEditorInitialize Event
      FilterControlCustomValueDisplayText Event
      FilterControlOperationVisibility Event
      FilterControlParseValue Event
      FocusedNodeChanged Event
      HeaderFilterFillItems Event
      HtmlCommandCellPrepared Event
      HtmlDataCellPrepared Event
      HtmlRowPrepared Event
      InitNewNode Event
      NodeCollapsed Event
      NodeCollapsing Event
      NodeDeleted Event
      NodeDeleting Event
      NodeExpanded Event
      NodeExpanding Event
      NodeInserted Event
      NodeInserting Event
      NodeUpdated Event
      NodeUpdating Event
      NodeValidating Event
      PageIndexChanged Event
      PageSizeChanged Event
      ParseValue Event
      ProcessColumnAutoFilter Event
      ProcessDragNode Event
      ProcessOnClickRowFilter Event
      SearchPanelEditorCreate Event
      SearchPanelEditorInitialize Event
      SelectionChanged Event
      StartNodeEditing Event
      ToolbarItemClick Event
      VirtualModeCreateChildren Event
      VirtualModeNodeCreated Event
      VirtualModeNodeCreating Event
    [Expand]ASPxTreeList Methods
   [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
   [Expand]TreeListCustomNodeSortEventArgs Class
    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

ASPxTreeList.NodeValidating Event

Enables you to specify whether node data is valid, and whether the node can be updated.

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

Expanded Syntax

Expanded Event Data

The event handler receives an argument of type TreeListNodeValidationEventArgs containing data related to this event.

The following TreeListNodeValidationEventArgs properties provide information specific to this event.
Property Description
Errors Gets a collection of node errors.
HasErrors Gets whether the processed node has errors.
IsNewNode Gets whether the processed node is new.
Keys Gets a dictionary of field name/value pairs that represent the primary key of the node to validate.
NewValues Gets a dictionary that contains the values of the non-key field name/value pairs in the node to be validated.
NodeError Gets or sets the error text displayed within the Error Node.
OldValues Gets a dictionary that contains the original field name/value pairs in the node to validate.

Expanded Remarks

The NodeValidating event is raised when a node is about to be updated, and allows you to implement server-side data validation. To manually force the validation, call the DoNodeValidation method.

To obtain the edited node's values, use the event parameter's TreeListNodeValidationEventArgs.NewValues property. The old values are returned by the TreeListNodeValidationEventArgs.OldValues property. If the value is invalid, use the TreeListNodeValidationEventArgs.Errors property to specify the error description text. As a result, an error icon will be displayed next to the invalid value. Pointing to the icon shows the hint with the error description.

To display the Error Node, specify the TreeListNodeValidationEventArgs.NodeError property. This node is automatically displayed below the Edit Form if the TreeListNodeValidationEventArgs.NodeError property is set to a not empty string.

To learn more, see Node Validation and Error Indication.

Expanded Example

This example demonstrates how to check the validity of data entered by end-users into a node. Validation is implemented within the NodeValidating event handler. In this sample, validation fails in the cases listed below:

  • the department isn't specified;
  • the budget is negative.

The image below shows the result:

Expanded See Also

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