این رویداد رو اینطوری اصلاح کنید:
private void button2_Click(object sender, EventArgs e)
{
frmCategoryEdit catedit = new frmCategoryEdit();
int editingId = (int)this.dataGridView1[0, dataGridView1.CurrentRow.Index].Value;
catedit.textBox1.Text = this.dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
catedit.textBox2.Text = this.dataGridView1[1, dataGridView1.CurrentRow.Index].Value.ToString();
catedit.ShowDialog();
frmCategoryList_Load(sender, e);
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (row.Cells[0].Value != null && row.Cells[0].Value.Equals(editingId))
{
dataGridView1.CurrentCell = row.Cells[0];
break;
}
}
}