Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 547.8k

Loop thru Gridview

May 4 2023 9:29 AM

Hi

  I have below code & i want to loop thru Gridview which have value in Date column i want to add those records

DataTable dt = sQLUtility.GeBookPlanningRecommendation(HRpl, BookCollection, StudentCollection).Tables[0];
if (dt != null)
{
    DataColumn Remarks = new DataColumn("Remarks", typeof(string));
    dt.Columns.Add(Remarks);
    DataColumn Dates = new DataColumn("Date", typeof(DateTime));
    dt.Columns.Add(Dates);

    grdPlanning.DataSource = dt;
    grdPlanning.DataBind();
}

Thanks


Answers (7)