Spread Windows Forms 9.0 Product Documentation
CellClick Event
Example 


Occurs when the user presses the left mouse button down in a cell.
Syntax
'Declaration
 
Public Event CellClick As CellClickEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As CellClickEventHandler
 
AddHandler instance.CellClick, handler
public event CellClickEventHandler CellClick
Event Data

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

PropertyDescription
ButtonGets which mouse button has been pressed.  
CancelGets or sets whether to cancel default processing.  
ColumnGets the column index of the cell that is clicked.  
ColumnFooterGets whether the cell that is clicked is in the column footer.  
ColumnHeaderGets whether the cell that is clicked is in the column headers.  
RowGets the row index of the cell that is clicked.  
RowHeaderGets whether the cell that is clicked is in the row headers.  
ViewGets the view that contains the cell that is clicked.  
XGets the x-coordinate of the pointer position.  
YGets the y-coordinate of the pointer position.  
Remarks

This event is raised by the OnCellClick method when the user presses down the mouse button in a cell.

For more details on the individual event arguments, refer to CellClickEventArgs members.

Note that this event is raised when the mouse button is pressed, not when it is released.

To set what this event does (whether it selects a cell, a row, etc.), refer to the OperationMode enumeration.

Example
This example raises the cell click event when the user clicks in a cell.
Label1.Text = "Click in a cell to fire the CellClick event";

private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
     ListBox1.Items.Add("CellClick event fired!");
}
Label1.Text = "Click in a cell to fire the CellClick event"

Private Sub FpSpread1_CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
    ListBox1.Items.Add("CellClick event fired!")
End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FpSpread Class
FpSpread Members
CellClickEventArgs Class

User-Task Documentation

Specifying What the User Can Select

 

 


Copyright © GrapeCity, inc. All rights reserved.