DataTable table = new DataTable(); //add column table.Columns.Add(new DataColumn("name", typeof(string))); //add row DataRow row = table.NewRow(); row["Name"] = "abc"; table.Rows.Add(row); //bind data to gridView GridView1.DataSource = table; GridView1.DataBind();
No comments:
Post a Comment