Spread Windows Forms 15.0
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcTextBoxCellType Class / MaxLength Property


In This Topic
    MaxLength Property (GcTextBoxCellType)
    In This Topic
    Gets or sets the maximum number of characters or bytes that the control can hold.
    Syntax
    'Declaration
     
    
    Public Property MaxLength As Integer
    'Usage
     
    
    Dim instance As GcTextBoxCellType
    Dim value As Integer
     
    instance.MaxLength = value
     
    value = instance.MaxLength
    public int MaxLength {get; set;}

    Property Value

    The number of characters or bytes (determined by the LengthAsByte property) that can be entered into the control.
    The default is zero.
    Exceptions
    ExceptionDescription
    If the value is less than zero, an ArgumentOutOfRangeException is thrown.
    Remarks
    The MaxLength property allows you to limit the number of characters a user can enter in the control. The default value is 0, which does not limit the number of characters. Any number greater than 0 indicates the maximum number of characters. The MaxLengthUnit effects the display results with the MaxLength property.
    See Also