1 /// <summary> 2 /// 设置焦点到Cell 3 /// </summary> 4 /// <param name="view"></param> 5 /// <param name="rowHandle"></param> 6 /// <param name="columnIndex"></param> 7 protected virtual void SetFocused(GridView view, Int32 rowHandle, Int32 columnIndex) 8 { 9 view.Focus(); 10 view.FocusedRowHandle = rowHandle; 11 if (view.Columns.Count > columnIndex) 12 { 13 view.FocusedColumn = view.Columns[columnIndex]; 14 } 15 view.ShowEditor(); 16 } 17 protected virtual void SetFocused(GridView view, Int32 rowHandle, string columnName) 18 { 19 view.Focus(); 20 view.FocusedRowHandle = rowHandle; 21 view.FocusedColumn = view.Columns[columnName]; 22 view.ShowEditor(); 23 }