Hi
try this code in Add and Save button click events
private void btnAdd_Click(object sender, EventArgs e)
{
dataGridView1.Rows.Add();
dataGridView1.Rows[inindex].Cells[0].Value = txtdescription.Text;
dataGridView1.Rows[inindex].Cells[1].Value = txtformulaname.Text;
dataGridView1.Rows[inindex].Cells[2].Value = txtFormula.Text;
inindex++;
}
private void btnSave_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow Row in dataGridView1.Rows)
{
/*take each cell value like this
value1=Row.Cells[0].Value;
value2=Row.Cells[1].Value,
value3=Row.Cells[2].Value; and Save to Database*/
}
}