Saturday, August 11, 2018

ADD DYNAMIC VALUE ON GRIDVIEW


ADD   DYNAMIC  VALUE ON GRIDVIEW
DataTable dt = new DataTable();

dt.Columns.AddRange(new DataColumn[3]

{

new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Email",typeof(string))


});


dt.Rows.Add(1, "John Hammond", "john.hammond@test.com");
dt.Rows.Add(2, "Mudassar Khan", "mudassar.khan@test.com");
dt.Rows.Add(3, "Suzanne Mathews", "suzzane.mathews@test.com");

dt.Rows.Add(4, "Robert Schidner", "robert.schidner@test.com");


GridView1.DataSource = dt;
GridView1.DataBind();


No comments:

Post a Comment

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create  Student : roll , name , city , cost  Fix 6 Value  in Database Record  ====================================================...