private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{ _dept = (Department)gridView1.GetFocusedRow();
textEdit1.Text = _dept.Name;
}

  这个要用到 gridView1 的 FocusedRowChanged 事件 获取这一行的数据。

04-18 11:46