string firstColumn = txtproject.Text; string secondColumn = txtcode.Text; string[] row = { firstColumn, secondColumn }; dataGridView1.Rows.Add(row);
int i = dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = txtproject.Text; dataGridView1.Rows[i].Cells[1].Value = txtcode.Text;
this code will working correctly...u should wrote that inside button click event...I have checked it..
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)