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


Glossary Item Box

Gets or sets the value from the drop-down dialog.

Syntax

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

Property Value

An object that indicates the value from the drop-down dialog.

Remarks

The property retrieves the value of the drop-down dialog.

Example

This example uses the Value property.
C#Copy Code
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).DropDownClosing += new EventHandler<GrapeCity.Win.Spread.InputMan.CellType.DropDownClosingEventArgs>(IMCellType_DropDownClosing);

        }

        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).DropDownClosing -= new EventHandler<GrapeCity.Win.Spread.InputMan.CellType.DropDownClosingEventArgs>(IMCellType_DropDownClosing);
        }

        void IMCellType_DropDownClosing(object sender, GrapeCity.Win.Spread.InputMan.CellType.DropDownClosingEventArgs e)
        {
            if (e.Value != null)
            {
                listBox1.Items.Add(e.Value.ToString());
            }
VB.NETCopy Code
FpSpread1.ActiveSheet.Cells(0, 0).CellType = New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType
 
    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).DropDownClosing, AddressOf IMCellType_DropDownClosing
        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).DropDownClosing, AddressOf IMCellType_DropDownClosing
        End If
    End Sub

    Private Sub IMCellType_DropDownClosing(ByVal sender As Object, ByVal e As GrapeCity.Win.Spread.InputMan.CellType.DropDownClosingEventArgs)
        If e.Value <> Nothing Then
            ListBox1.Items.Add(e.Value.ToString())
        End If

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.