private void CreateEditDialog(int rowIndex) { AddWindow addWindow = new AddWindow((Requests)dataGridView1.Rows[rowIndex].DataBoundItem, service); addWindow.Text = "Редактирование существующей заявки"; addWindow.ShowDialog(); // HACK: According to https://msdn.microsoft.com/en-us/library/bb384428.aspx dataGridView1.DataSource = service.getDataSource(); }
private void addRequestToolStripMenuItem_Click(object sender, EventArgs e) { dataGridView1.DataSource = service.getDataSource(); AddWindow addWindow = new AddWindow(service); addWindow.ShowDialog(); // HACK: According to https://msdn.microsoft.com/en-us/library/bb384428.aspx dataGridView1.DataSource = service.getDataSource(); }