if add row to DataTable
DataRow row = datatable1.NewRow();
row["column2"]="column2";
row["column6"]="column6";
datatable1.Rows.Add(row);
How about DataGridView
??
if add row to DataTable
DataRow row = datatable1.NewRow();
row["column2"]="column2";
row["column6"]="column6";
datatable1.Rows.Add(row);
How about DataGridView
??
This is how I add a row if the dgrview is empty: (myDataGridView has two columns in my example)
According to docs: "CreateCells() clears the existing cells and sets their template according to the supplied DataGridView template".
An example of copy row from dataGridView and added a new row in The same dataGridView: