Ramco Ramco

Ramco Ramco

  • 437
  • 3.4k
  • 548.1k

How to get Gridview Column value

May 4 2023 11:36 AM

Hi

I have below code & i want to loop thru Gridview which have value in Date column i want to get Remarks column value also stored in variable

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();
}

Answers (3)