Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.5k

Hide Gridview Column

May 3 2023 4:27 PM

Hi

  How to hide GridView column if Autogenerate columns = true. Below is my code. But i want to read its value

SQLUtility sQLUtility = new SQLUtility();
DataTable dt = sQLUtility.GeBookPlanningRecommendation(vRpl, 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 (2)