Spread for ASP.NET 9.0 Product Documentation
CreateButton Event
Example 


Occurs when the user clicks on the Create button.
Syntax
'Declaration
 
Public Event CreateButton As CreateButtonEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As CreateButtonEventHandler
 
AddHandler instance.CreateButton, handler
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
CommandGets the name of the command to perform.  
DisabledGets whether the command button is unavailable.  
DisabledImgUrlGets or sets the URL of the image to display in the command button if the button is unavailable.  
EnabledImgUrlGets or sets the URL of the image to display in the command button if the button is active.  
LabelGets or sets the text that displays in the command button.  
VisibleGets 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.
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"
    }
}
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 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.