[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
    Product Structure
   [Expand]Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
   [Expand]Pivot Table Overview
   [Expand]Charts and Graphics
    Operation Restrictions
    Find and Replace
   [Expand]Mail Merge
   [Collapse]Visual Elements
      Format Cells Dialog
      Paste Special Dialog
      Edit Hyperlink Dialog
      Symbol Dialog
      Create Table Dialog
      Change Chart Type Dialog
      Find and Replace Dialog
      Encrypt Document Dialog
      Password Dialog
      Protect Workbook Dialog
      Protect Sheet Dialog
      User Permissions Dialog
      Insert Function Dialog
      Function Arguments Dialog
      Name Manager
      New Name Dialog
      Create Names from Selection Dialog
      Subtotal Dialog
      Data Validation Dialog
      Properties Dialog
      Page Setup Dialog
      Header and Footer Dialog
      Create PivotTable Dialog
      Move PivotTable Dialog
      Change PivotTable Data Source Dialog
      PivotTable Field List
      PivotTable Value Field Settings Dialog
      PivotTable Field Settings Dialog
      PivotTable Sort Dialog
      Insert Calculated Field Dialog
      Insert Calculated Item Dialog
      PivotTable Solve Order Dialog
      PivotTable Options Dialog
      New Formatting Rule Dialog
      Conditional Formatting Rules Manager
     Pop-up Menus
    Themes and Templates
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Data Validation Dialog

The Data Validaition dialog allows end-users to create data validation rules to prevent other users from entering incorrect values in validated cells. End-users can also set warnings displayed when entering invalid data, or create pop-up messages to explain the reason for the restriction or instruct users how to correct errors.

End-users can invoke the dialog by clicking the Data Validation item in the Data Validation drop-down menu. Add the Data Tools ribbon page group to enable this menu. Refer to the Lesson 1 - Create a Simple Spreadsheet tutorial to learn how to create a spreadsheet application with the ribbon UI.

The dialog includes the following tabs:

Expanded Settings

This tab allows end-users to create a validation rule. The table below describes the data validation types (DataValidation.ValidationType) available in the Allow list.

Data Validation Type



List (DataValidationType.List)

Restricts data entry to predefined items in a list. In the Source box, end-users can type a list of comma-separated values, define a name for the cell range of valid entries, or select this cell range in the worksheet by using the Collapse Dialog button. Check the In-cell dropdown box to make a drop-down list of available values appear when selecting a cell to which the validation is applied.

Whole Number (DataValidationType.WholeNumber)

Decimal (DataValidationType.Decimal)

Restricts numbers outside a specified range.

Date (DataValidationType.Date)

Time (DataValidationType.Time)

Restricts dates and times outside a certain time frame.

Text Length (DataValidationType.TextLength)

Limits the number of text characters.

Custom (DataValidationType.Custom)

Validates data based on formulas or values in other cells. The formula should return a logical value: TRUE for valid values and FALSE for incorrect values. The formula may also contain cell references, so that end-users can calculate the allowable values based on the content of other cells.

Expanded Input Message

Options under this tab allow end-users to create a message that explains what data can be entered in a cell.

You can type the message title (DataValidation.InputTitle) in the Title box and text (DataValidation.InputMessage) in the Input Message box.

As a result, a yellow text box appears near the cell displaying the input message.

Expanded Error Alert

Using this tab, end-users can create a message that appears when incorrect data is entered.

Select the desired item from the Style drop-down list to create one of the following types of error messages (DataValidation.ErrorStyle):

  • Stop (default) - specifies that users are not allowed to enter invalid data in a validated cell.

  • Warning - allows users to enter an incorrect value in a validated cell, but warns them that the specified value is invalid.

  • Information - informs users that they entered an incorrect value and allows them to accept or reject this value.


Use the DataValidationCollection.Add method to create a new validation rule in code. Refer to the Data Validation topic for details.

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