private void list_dataGridView_DoubleClick(object sender, EventArgs e) { if (list_dataGridView.Rows.Count > 0 && list_dataGridView.SelectedRows.Count > 0) { int index = list_dataGridView.SelectedRows[0].Index; using (DailyReportWindow _form = new DailyReportWindow(_FY, this._userID, _mr.getCalYear(), _mr.getMonth(), index + 1)) { _form.ShowDialog(this); _form.Dispose(); this.reloadWindow(); // Window表示前の行を選択する list_dataGridView.ClearSelection(); list_dataGridView.Rows[index].Selected = true; } /* * MessageBox.Show("DailyReportWindow.showDialog(" + _mr.getCalYear() + "," + _mr.getMonth() + "," + (index + 1) + "," + this._userID.ToString() + ")"); */ } }
private void list_dataGridView_DoubleClick(object sender, EventArgs e) { if (list_dataGridView.Rows.Count > 0 && list_dataGridView.SelectedRows.Count > 0) { int index = list_dataGridView.SelectedRows[0].Index; using (DailyReportWindow _form = new DailyReportWindow(_FY, this._userID, _mr.getCalYear(), _mr.getMonth(), index + 1)) { _form.ShowDialog(this); _form.Dispose(); this.reloadWindow(); // Window表示前の行を選択する list_dataGridView.ClearSelection(); list_dataGridView.Rows[index].Selected = true; } /* MessageBox.Show("DailyReportWindow.showDialog(" + _mr.getCalYear() + "," + _mr.getMonth() + "," + (index + 1) + "," + this._userID.ToString() + ")"); */ } }