Spread Windows Forms 7.0 Product Documentation
MaxMinBehavior Property
See Also  Example Support Options
GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcDateTimeCellType Class : MaxMinBehavior Property


Glossary Item Box

Gets or sets the behavior when the new input value is outside of GcDateTime.MinDate and GcDateTime.MaxDate.

Syntax

Visual Basic (Declaration) 
Public Property MaxMinBehavior As MaxMinBehavior
Visual Basic (Usage)Copy Code
Dim instance As GcDateTimeCellType
Dim value As MaxMinBehavior
 
instance.MaxMinBehavior = value
 
value = instance.MaxMinBehavior
C# 
public MaxMinBehavior MaxMinBehavior {get; set;}

Property Value

A GcDateTime.MaxMinBehavior enumeration value that indicates the behavior when the new input value is outside of GcDateTime.MinDate and GcDateTime.MaxDate.
The default is MaxMinBehavior.AdjustToMaxMin.

Exceptions

ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe value is not a valid GcDateTime.MaxMinBehavior item.

Example

This example uses the MaxMinBehavior property.
C#Copy Code
GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType datecell = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
datecell.MaxDate = new System.DateTime(9999, 12, 31);
datecell.MinDate = DateTime.Now;
datecell.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear;
fpSpread1.Sheets[0].Cells[0, 0].CellType = datecell;
VB.NETCopy Code
Dim datecell As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
datecell.MaxDate = new System.DateTime(9999, 12, 31)
datecell.MinDate = DateTime.Now
datecell.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear
FpSpread1.Sheets(0).Cells(0, 0).CellType = datecell

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.