GrapeCity MultiRow Windows Forms Documentation
ShowSpinButton Property (DomainUpDownCell)
Example 


Gets or sets a value that indicates how to show the drop-down button when the cell is not in edit mode.
Syntax
<DefaultValueAttribute()>
<SRCategoryAttribute("Appearance")>
<SRDescriptionAttribute("Indicates how to show the dropDown button when the cell is not in edit mode.")>
Public Property ShowSpinButton As CellButtonVisibility
Dim instance As DomainUpDownCell
Dim value As CellButtonVisibility
 
instance.ShowSpinButton = value
 
value = instance.ShowSpinButton
[DefaultValue()]
[SRCategory("Appearance")]
[SRDescription("Indicates how to show the dropDown button when the cell is not in edit mode.")]
public CellButtonVisibility ShowSpinButton {get; set;}

Property Value

One of the CellButtonVisibility values that indicates how to show the drop-down button when the cell is not in edit mode. The default is CellButtonVisibility.ShowAlways.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not one of the CellButtonVisibility values.
Example
The following code example shows how to set UpDown button's visibility through this property. This example is part of a larger example available for the DomainUpDownCell class.
void setShowSpinButtonButton_Click(object sender, EventArgs e)
        {
            DomainUpDownCell domainUpDownCell1 = this.gcMultiRow1[0, 0] as DomainUpDownCell;
            if (domainUpDownCell1.ShowSpinButton == 
CellButtonVisibility.ShowAlways||domainUpDownCell1.ShowSpinButton== 
CellButtonVisibility.ShowForCurrentCell)
            {
                domainUpDownCell1.ShowSpinButton = CellButtonVisibility.NotShown;
            }
            else
            {
                domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowAlways;
            }
            label.Text = "Click the button repeatedly, the ShowSpinButton property takes effect.";
        }
Private Sub setShowSpinButtonButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setShowSpinButtonButton.Click
        Dim domainUpDownCell1 As DomainUpDownCell = TryCast(Me.gcMultiRow1(0, 0), DomainUpDownCell)
        If domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowAlways OrElse domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowForCurrentCell Then
            domainUpDownCell1.ShowSpinButton = CellButtonVisibility.NotShown
        Else
            domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowAlways
        End If
        label.Text = "Click the button repeatedly, the ShowSpinButton property will take effect."
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DomainUpDownCell Class
DomainUpDownCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.