Firstly make the cells that you are interested in wrappable by setting the default style ...
dataGridView1.Columns[0].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
Note I've chosen only the first column here [0]. If you wanted all cells to wrap then use
dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
To increase the height of all of the rows automatically ...
dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
or if you want to specifically target specific rows then it's
dataGridView1.AutoResizeRow(RowNumber, DataGridViewAutoSizeRowMode.AllCells);
where
RowNumber
is some integer value. My advice would be to let the control do the resizing though