private void button1_Click(object sender, EventArgs e) { DataGridViewRow dgr = dataGridView1.Rows[dataGridView1.CurrentRow.Index]; DataRow dr = itemsDT.Rows[(int)dgr.Cells["idx"].Value]; hiseq++; AddRepeatItem(dr); //sql query to insert into table GetNewItem(); //sql query to select newly added item if (newitemDT.Rows.Count == 0) { MessageBox.Show("Error writing repeat item entry. Call Systems. "); } DataRow dr2 = newitemDT.Rows[0]; //itemsDT.Rows.Add(dr2); itemsDT.ImportRow(dr2); FillGridRow(dr2, newitemDT.Rows.Count - 1); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)