One method is to take a string array with all the values that are contained in the row and insert it into the DataGridView using the Rows.Add method.
The following example loads multiple rows into the DataGridView.
Example from MSDN:
CODE
// Populate the rows.
string[] row1 = new string[]{"Meatloaf",
"Main Dish", boringMeatloaf, boringMeatloafRanking};
string[] row2 = new string[]{"Key Lime Pie",
"Dessert", "lime juice, evaporated milk", "****"};
string[] row3 = new string[]{"Orange-Salsa Pork Chops",
"Main Dish", "pork chops, salsa, orange juice", "****"};
string[] row4 = new string[]{"Black Bean and Rice Salad",
"Salad", "black beans, brown rice", "****"};
string[] row5 = new string[]{"Chocolate Cheesecake",
"Dessert", "cream cheese", "***"};
string[] row6 = new string[]{"Black Bean Dip", "Appetizer",
"black beans, sour cream", "***"};
object[] rows = new object[] { row1, row2, row3, row4, row5, row6 };
foreach (string[] rowArray in rows)
{
dataGridView.Rows.Add(rowArray);
}
Example only loading one row at a time:
CODE
// Populate the new row with data
string[] rowArray = new string[]{"Meatloaf",
"Main Dish", boringMeatloaf, boringMeatloafRanking};
//Add the new row to the DataGridView
dataGridView.Rows.Add(rowArray[0]);
You can find out more information at the following link to the MSDN.
Manipulate Rows in a DataGridView.Hope that helps.