private void gridView1_GotFocus(object sender, EventArgs e) { if (gridView1.GetFocusedRow()!=null) { ParentObj = gridView1.GetFocusedRow() as E_Prize; } }
/// <summary> /// 新建对象设置Key值 /// </summary> /// <param name="newobj"></param> void gridViewOperation_CreatingObjectEvent(E_Prize newobj) { try { newobj.BeginDate = DateTime.Now; newobj.EndDate = DateTime.Now.AddMonths(3); } catch (Exception ee) { } }