Spread for ASP.NET 7.0 Product Documentation
DatePickerMode Enumeration
Example  See Also  Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace : DatePickerMode Enumeration


Glossary Item Box

Specifies how to display the DatePicker control in the filter bar.

Syntax

Visual Basic (Declaration) 
Public Enum DatePickerMode 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As DatePickerMode
C# 
public enum DatePickerMode : System.Enum 

Members

MemberDescription
AutoShows or hides the DatePicker control based on the type of data in the column. If the drop-down button is not displayed, the date picker button is not displayed.
HideHides the DatePicker control in the filter bar.
ShowShows the DatePicker control in the filter bar.

Example

This example sets the DatePickerMode enumeration.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (this.IsPostBack) return;
FarPoint.Web.Spread.DateTimeCellType dt = new FarPoint.Web.Spread.DateTimeCellType();
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo();
dtf.LongDatePattern = "D";
dtf.ShortDatePattern = "M/d/yyyy";
dt.DateTimeFormat = dtf;
FpSpread1.Sheets[0].Cells[0, 0, 0, 2].CellType = dt;
FpSpread1.ActiveSheetView.Cells[0, 0].Value = DateTime.Now;

FarPoint.Web.Spread.FilterBarCellType fbcell = new FarPoint.Web.Spread.FilterBarCellType(true);
fbcell.DatePickerMode = FarPoint.Web.Spread.DatePickerMode.Auto;

FpSpread1.Sheets[0].RowCount = 6;
FpSpread1.Sheets[0].ColumnCount = 6;
//Customize "Cells" in Filter Bar
FarPoint.Web.Spread.SheetView sheetView = FpSpread1.ActiveSheetView;
sheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar;  
sheetView.FilterBar.Cells[0].CellType = fbcell;
sheetView.FilterBar.Cells[0].BackColor = System.Drawing.Color.Aqua;
}
VB.NETCopy Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
If (IsPostBack) Then
    Return
End If
Dim dt As New FarPoint.Web.Spread.DateTimeCellType()
Dim dtf As New System.Globalization.DateTimeFormatInfo()
dtf.LongDatePattern = "D"
dtf.ShortDatePattern = "M/d/yyyy"
dt.DateTimeFormat = dtf
FpSpread1.Sheets(0).Cells(0, 0, 0, 2).CellType = dt
FpSpread1.ActiveSheetView.Cells(0, 0).Value = DateTime.Now

Dim fbcell As New FarPoint.Web.Spread.FilterBarCellType(True)
fbcell.DatePickerMode = FarPoint.Web.Spread.DatePickerMode.Auto

FpSpread1.Sheets(0).RowCount = 6
FpSpread1.Sheets(0).ColumnCount = 6
'Customize "Cells" in Filter Bar
Dim sheetView As FarPoint.Web.Spread.SheetView = FpSpread1.ActiveSheetView
sheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar
sheetView.FilterBar.Cells(0).CellType = fbcell
sheetView.FilterBar.Cells(0).BackColor = System.Drawing.Color.Aqua
End Sub

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.DatePickerMode

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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