GrapeCity.Xaml.SpreadSheet.UI
CellClick Event (GcSpreadSheet)
Example 


GrapeCity.Xaml.SpreadSheet.UI Namespace > GcSpreadSheet Class : CellClick Event
Occurs when the user presses down the left mouse button in a cell.
Syntax
'Declaration
 
Public Event CellClick As EventHandler(Of CellClickEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of CellClickEventArgs)
 
AddHandler instance.CellClick, handler
public event EventHandler<CellClickEventArgs> 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
Gets the mouse button that is clicked.  
Gets the column index of the clicked cell.  
Gets the row index of the clicked cell.  
Gets the area the clicked cell is in.  
Example
This example uses the CellClick event.
private void gcSpreadSheet1_CellClick(object sender, GrapeCity.Xaml.SpreadSheet.UI.CellClickEventArgs e)
        {
            listBox1.Items.Add(e.ButtonType.ToString());
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.Row.ToString());
            listBox1.Items.Add(e.SheetArea.ToString());
        }

private void gcSpreadSheet1_CellDoubleClick(object sender, GrapeCity.Xaml.SpreadSheet.UI.CellDoubleClickEventArgs e)
        {
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.Row.ToString());
            listBox1.Items.Add(e.SheetArea.ToString());            
        }
Private Sub gcSpreadSheet1_CellClick(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.CellClickEventArgs) Handles gcSpreadSheet1.CellClick
        ListBox1.Items.Add(e.ButtonType.ToString())
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.Row.ToString())
        ListBox1.Items.Add(e.SheetArea.ToString())
    End Sub

    Private Sub gcSpreadSheet1_CellDoubleClick(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.CellDoubleClickEventArgs) Handles gcSpreadSheet1.CellDoubleClick
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.Row.ToString())
        ListBox1.Items.Add(e.SheetArea.ToString())
    End Sub
See Also