GrapeCity MultiRow Windows Forms Documentation
SelectionChanged Event
Example 


Occurs when selected cells and selected rows change.
Syntax
<SRDescriptionAttribute("Occurs when the current selection changes.")>
<SRCategoryAttribute("Action")>
Public Event SelectionChanged As EventHandler
Dim instance As GcMultiRow
Dim handler As EventHandler
 
AddHandler instance.SelectionChanged, handler
[SRDescription("Occurs when the current selection changes.")]
[SRCategory("Action")]
public event EventHandler SelectionChanged
Remarks
This event occurs when cells are selected or the selection is canceled, whether programmatically or by a user action. This event is useful when you want display the sum of currently selected cells.
Example
The following code example shows how to use this event. This code example is part of a larger example provided for the ViewMode class.
void gcMultiRow1_SelectionChanged(object sender, EventArgs e)
       {
           this.Text = "Selected cell count: " + this.gcMultiRow1.SelectedCells.Count;
           this.Text += "  Selected row count: " + this.gcMultiRow1.SelectedRows.Count;
       }
Private Sub gcMultiRow1_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs) Handles gcMultiRow1.SelectionChanged
        Me.Text = "Selected cell count: " + Me.gcMultiRow1.SelectedCells.Count.ToString()
        Me.Text += "  Selected row count: " + Me.gcMultiRow1.SelectedRows.Count.ToString()
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GcMultiRow Class
GcMultiRow Members

 

 


Copyright © GrapeCity, inc. All rights reserved.