Xceed Grid for WinForms v4.3 Documentation
Using the PropertyChanged events

Welcome to Xceed Grid for WinForms v4.3 > Basic Concepts > Events > Using the PropertyChanged events

Raised when the value of a grid element's property changes to provide notification that the property has been modified. These events can be used, for example, to update a text box with new information when something on the grid changes.

Basic steps - C#

To subscribe to a PropertyChanged event, for example the GridControl.CurrentRowChanged event, the following steps must be performed:

Basic steps - VB.NET

To subscribe to a PropertyChanged event, for example the GridControl.CurrentRowChanged event,   the following steps must be performed:

Demonstration

This example assumes that you are in a Windows application.

VB.NET Copy Code

Imports Xceed.Grid

Dim grid As New GridControl()
AddHandler grid.CurrentRowChanged, AddressOf Me.grid_CurrentRowChanged

Private Sub grid_CurrentRowChanged( ByVal sender As Object, ByVal e As EventArgs )
  ' Add code here
End Sub

' If you no longer wish to handle the CurrentRowChanged events that are raised,
' you can unsubscribe from the event notification by doing the following:
RemoveHandler grid.CurrentRowChanged, AddressOf Me.grid_CurrentRowChanged

C# Copy Code

using Xceed.Grid;
GridControl grid = new GridControl();
grid.CurrentRowChanged += new EventHandler( this.grid_CurrentRowChanged );

// This method will handle the CurrentRowChanged events that are raised.
private void grid_CurrentRowChanged( object sender, EventArgs e )
{
  //  Add code here
}

// If you no longer wish to handle the CurrentRowChanged events that are raised,
// you can unsubscribe from the event notification by doing the following:
grid.CurrentRowChanged -= new EventHandler( this.grid_CurrentRowChanged );

Remarks

The PropertyChanged events are not raised when the value of a parent's property changes.