Hi,Pls try to below logic...........
DataTable dt = new DataTable();
DataRow dr = null;
dt.Columns.Add(new DataColumn("Count", typeof(string)));
dt.Columns.Add(new DataColumn("hour", typeof(string)));
dt.Columns.Add(new DataColumn("date", typeof(string)));
dr["Count"] = grdview.Rows[row.RowIndex].Cells[1].Text.ToString();
dr["hour"] = grdview.Rows[row.RowIndex].Cells[2].Text.ToString();
dr["date"] = System.DateTime.Now.ToString("dd/MM/yyyy");
dt.Rows.Add(dr);
gvReport.DataSource = dt;
gvReport.DataBind();
(OR)
if get the values from the data base table write stored procedure and call that procedure to dataset and add that dataset gridview.
Ex: dataset ds=new dataset();
ds="select count,hour,date from tablename";
gvReport.DataSource = ds;
gvReport.DataBind();
Rajasekhar0544, if this helps please login to Mark As Answer. | Alert Moderator