if I have a datagrid, how can i do the selectedindexchange on the selected index on that datagrid??

  • Thread starter Thread starter Jason
  • Start date Start date
Hi,

If you want to know when user navigates rows use the currency
manager. The currency manager has the Postion changed event.

In general declartions area
Dim WithEvents cm As CurrencyManager

Add right after you bind the datagrid

cm = CType(Me.BindingContext(DataGrid1.DataSource), CurrencyManager)

The event procedure

Private Sub cm_PositionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cm.PositionChanged

Me.Text = cm.Position

End Sub


Ken
 
Back
Top