Если вы хотите создать событие типа FocusedRowChanged
, вы можете использовать эти коды
//using DevExpress.XtraGrid.Views.Base;
//the All is ok
public event FocusedRowChangedEventHandler MyFocusedRowChanged;
//Or
public event EventHandler<FocusedRowChangedEventArgs> MyFocusedRowChanged2;
Если вы хотите обработать FocusedRowChanged
событие, вы можете использовать эти коды
private void YourForm_Load(object sender, EventArgs e)
{
gridView.FocusedRowChanged += GridView_FocusedRowChanged;
this.MyFocusedRowChanged += GridView_FocusedRowChanged;
this.MyFocusedRowChanged2 += GridView_FocusedRowChanged;
}
private void GridView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
//your code
throw new NotImplementedException();
}
Если вы хотите поднять FocusedRowChanged
, вы можете использовать эти коды
private void YourForm_Load(object sender, EventArgs e)
{
//gridView.FocusedRowChanged += GridView_FocusedRowChanged;
//this.MyFocusedRowChanged += GridView_FocusedRowChanged;
//this.MyFocusedRowChanged2 += GridView_FocusedRowChanged;
//invoke the handle method
GridView_FocusedRowChanged(gridView, new FocusedRowChangedEventArgs(-1, gridView.FocusedRowHandle));
//or change focused row to fire event
gridView.FocusedRowHandle++;
}
Что вы имеете в виду?