Spread Silverlight Documentation
CellClick Event (GcSpreadSheet)
Example 


Occurs when the user presses down the left mouse button in a cell.
Syntax
'Declaration
 
Public Event CellClick As System.EventHandler(Of CellClickEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As System.EventHandler(Of CellClickEventArgs)
 
AddHandler instance.CellClick, handler
public event System.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
ButtonTypeGets the mouse button that is clicked.  
ColumnGets the column index of the clicked cell.  
RowGets the row index of the clicked cell.  
SheetAreaGets the area the clicked cell is in.  
Example
This example uses the CellClick event.
private void gcSpreadSheet1_CellClick(object sender, GrapeCity.Windows.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.Windows.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 System.Object, e As GrapeCity.Windows.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 System.Object, e As GrapeCity.Windows.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
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.