private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.Cells[0, 0].CellType = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
}
private void fpSpread1_EditModeOn(object sender, EventArgs e)
{
if (fpSpread1.EditingControl is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)
((GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)fpSpread1.EditingControl).DropDownOpening += new EventHandler<GrapeCity.Win.Spread.InputMan.CellType.DropDownOpeningEventArgs>(IMCellType_DropDownOpening);
}
private void fpSpread1_EditModeOff(object sender, EventArgs e)
{
if (fpSpread1.EditingControl is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)
((GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)fpSpread1.EditingControl).DropDownOpening -= new EventHandler<GrapeCity.Win.Spread.InputMan.CellType.DropDownOpeningEventArgs>(IMCellType_DropDownOpening);
}
void IMCellType_DropDownOpening(object sender, GrapeCity.Win.Spread.InputMan.CellType.DropDownOpeningEventArgs e)
{
e.Cancel = true;
}
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
fpSpread1.ActiveSheet.Cells(0, 0).CellType = New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType
End Sub
Private Sub fpSpread1_EditModeOff(ByVal sender As Object, ByVal e As System.EventArgs) Handles fpSpread1.EditModeOff
If TypeOf (fpSpread1.EditingControl) Is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime Then
RemoveHandler CType(fpSpread1.EditingControl, GrapeCity.Win.Spread.InputMan.CellType.GcDateTime).DropDownOpening, AddressOf IMCellType_DropDownOpening
End If
End Sub
Private Sub fpSpread1_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles fpSpread1.EditModeOn
If TypeOf (fpSpread1.EditingControl) Is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime Then
AddHandler CType(fpSpread1.EditingControl, GrapeCity.Win.Spread.InputMan.CellType.GcDateTime).DropDownOpening, AddressOf IMCellType_DropDownOpening
End If
End Sub
Private Sub IMCellType_DropDownOpening(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = True
End Sub