DataTable dt = new DataTable();
dt.Columns.Add("id");
dt.Columns.Add("name");
for (int i = 1; i <= 10; i )
{
DataRow row = dt.NewRow();
row["id"] = i;
row["name"] = "name" i;
dt.Rows.Add(row);
}
gv.DataSource = dt;
gv.DataBind();