public override void GV_Body_InitNewRow(object sender, InitNewRowEventArgs e) { base.GV_Body_InitNewRow(sender, e); ColumnView newview = (ColumnView)GC_Body.FocusedView; newview.FocusedColumn = newview.Columns["XB007"]; FocuseRow_Body = newview.FocusedRowHandle; newview.ShowEditor(); int idx = 0; for (int i = 0; i < GV_Body.RowCount; i++) { int mRow = GV_Body.GetRowHandle(i); if (GV_Body.IsMasterRow(mRow)) { idx++; } } GV_Body.SetFocusedRowCellValue("XG001", XF001.Text); GV_Body.SetFocusedRowCellValue("XG002", ""); GV_Body.SetFocusedRowCellValue("XG006", fc.FUser.ID); GV_Body.SetFocusedRowCellValue("XG006C", fc.FUser.Name); GV_Body.SetFocusedRowCellValue("XG010", string.Format("{0:0000}", idx)); }