Spread WPF Documentation
LeaveCell Event (GcSpreadSheet)
Example 


Occurs when the user leaves a cell.
Syntax
'Declaration
 
Public Event LeaveCell As System.EventHandler(Of LeaveCellEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As System.EventHandler(Of LeaveCellEventArgs)
 
AddHandler instance.LeaveCell, handler
public event System.EventHandler<LeaveCellEventArgs> LeaveCell
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs)
ColumnGets the column index of the cell being left.  
RowGets the row index of the cell being left.  
ToColumnGets the automatic column.  
ToRowGets the automatic row.  
Example
This example uses the LeaveCell event.
private void gcSpreadSheet1_InvalidOperation(object sender, GrapeCity.Windows.SpreadSheet.UI.InvalidOperationEventArgs e)
        {
            listBox1.Items.Add(e.Message.ToString());
        }

private void gcSpreadSheet1_LeaveCell(object sender, GrapeCity.Windows.SpreadSheet.UI.LeaveCellEventArgs e)
        {
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.Row.ToString());
        }
Private Sub GcSpreadSheet1_InvalidOperation(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.InvalidOperationEventArgs) Handles GcSpreadSheet1.InvalidOperation
        ListBox1.Items.Add(e.Message.ToString())
    End Sub

Private Sub GcSpreadSheet1_LeaveCell(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.LeaveCellEventArgs) Handles GcSpreadSheet1.LeaveCell
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.Row.ToString())
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.