Spread Windows Forms 12.0 Product Documentation
FilterBarFilterDateTime Field
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : FilterBarFilterDateTime Field
Specifies the index, 18, for the image for the filterbar calendar indicator. This field is constant and read-only.
Syntax
'Declaration
 
Public Const FilterBarFilterDateTime As Integer
'Usage
 
Dim value As Integer
 
value = SpreadView.FilterBarFilterDateTime
public const int FilterBarFilterDateTime
Example
This example creates a date time image for the filter bar.
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo();
dtf.ShortDatePattern = "M/d/yyyy";
dtf.ShortTimePattern = "";
dtf.LongTimePattern = "";    

FarPoint.Win.Spread.CellType.FilterBarCellType fbcell = new FarPoint.Win.Spread.CellType.FilterBarCellType();
fbcell.AutoFormat = true;
fbcell.ContextMenuType = FarPoint.Win.Spread.CellType.FilterBarContextMenuType.DateTime;
fbcell.DateTimeFormatInfo = dtf;
fpSpread1.Sheets[0].AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar;
fpSpread1.Sheets[0].FilterBar.Cells[0].CellType = fbcell;
fpSpread1.Sheets[0].Cells[0, 0].Value = "10/10/2014";
fpSpread1.Sheets[0].Columns[0].CellType = new FarPoint.Win.Spread.CellType.DateTimeCellType();
\\Select a date filter (such as before or after) to see the icon
FarPoint.Win.Spread.SpreadView wrkbk = fpSpread1.GetRootWorkbook();
wrkbk.SetImage(FarPoint.Win.Spread.SpreadView.FilterBarFilterDateTime, Image.FromFile("C:\\cut.png"));
Dim dtf As New System.Globalization.DateTimeFormatInfo()
dtf.ShortDatePattern = "M/d/yyyy"
dtf.ShortTimePattern = ""
dtf.LongTimePattern = ""

Dim fbcell As New FarPoint.Win.Spread.CellType.FilterBarCellType()
fbcell.AutoFormat = True
fbcell.ContextMenuType = FarPoint.Win.Spread.CellType.FilterBarContextMenuType.DateTime
fbcell.DateTimeFormatInfo = dtf
FpSpread1.Sheets(0).AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar
FpSpread1.Sheets(0).FilterBar.Cells(0).CellType = fbcell
FpSpread1.Sheets(0).Cells(0, 0).Value = "10/10/2014"
FpSpread1.Sheets(0).Columns(0).CellType = New FarPoint.Win.Spread.CellType.DateTimeCellType()
'Select a date filter (such as before or after) to see the icon
Dim wrkbk As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook()
wrkbk.SetImage(FarPoint.Win.Spread.SpreadView.FilterBarFilterDateTime, Image.FromFile("C:\cut.png"))
See Also

Reference

SpreadView Class
SpreadView Members