Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / DataValidationMessage Class
Example


In This Topic
    DataValidationMessage Class
    In This Topic
    Represents the message that the user will see when entering data in a Cell.
    Object Model
    DataValidationMessage ClassDataValidationMessage Class
    Syntax
    'Declaration
     
    
    Public Class DataValidationMessage 
    'Usage
     
    
    Dim instance As DataValidationMessage
    public class DataValidationMessage 
    Example
    using( var workbook = Workbook.Create( "AddDataValidation.xlsx" ) ) 
      { 
        // Gets the first Worksheet; a Workbook always contains at least 1 Worksheet. 
        var worksheet = workbook.Worksheets[ 0 ]; 
    
        // Creates a new DataValidation and assigns it to Cells A1 to A3. 
        var dataValidation = new DataValidation( ValidationType.Decimal, DataComparisonType.LessThanOrEqual ) { Value = 10 }; 
        dataValidation.InputMessage = new DataValidationMessage( "My Message", "Value must under 10" ); 
        worksheet.Cells[ "A1", "A3" ].DataValidation = dataValidation; 
    
        // Saves Workbook to disk; 
        workbook.Save(); 
      }
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.DataValidationMessage
          Xceed.Workbooks.NET.DataValidationError

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets if the input message is displayed when the user selects the target Cell(s) or hovers over them.  
    Public PropertyGets or sets the input message's text.  
    Public PropertyGets or sets the input message's title.  
    Top
    Public Methods
     NameDescription
    Public Method  
    Public MethodOverloaded.   
    Public Method  
    Top
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also