Spread ASP.NET 6.0 Product Documentation
CreateButton Event
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : CreateButton Event


Glossary Item Box

Occurs when the user clicks on the Create button.

Syntax

Visual Basic (Declaration) 
Public Event CreateButton As CreateButtonEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As CreateButtonEventHandler
 
AddHandler instance.CreateButton, handler
C# 
public event CreateButtonEventHandler CreateButton

Event Data

The event handler receives an argument of type CreateButtonEventArgs containing data related to this event. The following CreateButtonEventArgs properties provide information specific to this event.

PropertyDescription
Command Gets the name of the command to perform.
Disabled Gets whether the command button is unavailable.
DisabledImgUrl Gets or sets the URL of the image to display in the command button if the button is unavailable.
EnabledImgUrl Gets or sets the URL of the image to display in the command button if the button is active.
Label Gets or sets the text that displays in the command button.
Visible Gets or sets whether the button should be displayed.

Remarks

The CreateButtonEventHandler receives an argument of type CreateButtonEventArgs containing data related to this event.

Example

This example illustrates the use of the event.
C#Copy Code
private void FpSpread1CreateButton(object sender, FarPoint.Web.Spread.CreateButtonEventArgs e) 
{
    bool b;
    if (e.Command == "Update")
    {
        b = e.Disabled;
    }
    if (b = true)
    {
        e.DisabledImgUrl = "Images/unchecked.gif"
    }
}
Visual BasicCopy Code
Private Sub FpSpread1CreateButton(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.CreateButtonEventArgs) Handles FpSpread1.CreateButton
    Dim b As Boolean
    If e.Command = "Update" Then
        b = e.Disabled
        If b = True Then
            e.DisabledImgUrl = "Images/unchecked.gif"
        End If
    End If
End Sub

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.