[]
        
(Showing Draft Content)

GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType.MaxLength

MaxLength Property

MaxLength

Gets or sets the maximum number of characters or bytes that the control can hold.

Declaration
public int MaxLength { get; set; }
Public Property MaxLength As Integer
Property Value
Type Description
int

The number of characters or bytes (determined by the LengthAsByte property) that can be entered into the control.
The default is zero.

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 GrapeCity.Win.Spread.InputMan.CellType.GcTextBox.MaxLengthUnit effects the display results with the MaxLength property.

Exceptions
Type Condition
ArgumentOutOfRangeException

If the value is less than zero, an ArgumentOutOfRangeException is thrown.