private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { DATA.RemoveAt(tool.index); tool.rewriteLeads(); DATA = tool.readFile(); dataGridView1.Rows.Clear(); foreach (List <string> i in DATA) { dataGridView1.Rows.Add(i[3], i[0], i[1], i[2]); } }
private void button1_Click(object sender, EventArgs e) { string error = tool.editLead(textBox1.Text, textBox2.Text, textBox3.Text); if (error != "OK") { MessageBox.Show(error); } else { //List<List<string>> tmp = new List<List<string>>(); tool.rewriteLeads(); tool.readFile(); Form1 frm1 = this.Owner as Form1; frm1.dataGridView1.Rows.Clear(); foreach (List <string> i in tool.DATA) { frm1.dataGridView1.Rows.Add(i[3], i[0], i[1], i[2]); } this.Hide(); } }