It will be more fruitful for you provide some code snippet.
when you are inserting values in the cell, on last cell fill create a row dynamically on last cell fill.
GridViewRow row = new GridViewRow(
0,
0,
DataControlRowType.DataRow,
DataControlRowState.Normal);