Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / CellRange Class / DataValidation Property
Example


In This Topic
    DataValidation Property (CellRange)
    In This Topic
    Gets or sets the CellRange's DataValidation.
    Syntax
    'Declaration
     
    
    Public Property DataValidation As DataValidation
    'Usage
     
    
    Dim instance As CellRange
    Dim value As DataValidation
     
    instance.DataValidation = value
     
    value = instance.DataValidation
    public DataValidation DataValidation {get; set;}
    Example
    //We can get the DataValidation that is applied on the CellRange "B4-D1". If many DataValidations exist on that range, it returns the first one found. It will actually return a DataValidation even if it only partially applies to that range.
    DataValidation actual = doc.Worksheets[ 0 ].Cells[ "B4", "D1" ].DataValidation;
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also