protected virtual void OnContextChanging(ContextChangingEventArgs e) { var handler = ContextChanging; if (handler != null) { handler(this, e); } }
protected override void OnContextChanging(ContextChangingEventArgs e) { base.OnContextChanging(e); if (e.Original != null) { e.Original.BindingSource.PositionChanged -= OnFocusedRowChanged; } if (e.New != null) { e.New.BindingSource.PositionChanged += OnFocusedRowChanged; } }