Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 528.1k

1 column to be editable

Apr 30 2023 2:10 AM

Hi

  I have below Gridview & i want only last column Date to be editable

<asp:GridView ID="grdPlanning" class="table table-bordered" runat="server" OnRowDataBound="gr_RowDataBound" OnRowCommand="grdPlanning_RowCommand"> 
</asp:GridView>

DataTable BookPlanningResult = sQLUtility.GeBookPlanningRecommendation(vRpl, BookCollection, StudentCollection).Tables[0];
if (BookPlanningResult != null)
{
    DataColumn Remarks = new DataColumn("Remarks", typeof(string));
    BookPlanningResult.Columns.Add(Remarks);
    DataColumn Dates = new DataColumn("Date", typeof(DateTime));
    BookPlanningResult.Columns.Add(Dates);
    grdPlanning.DataSource = BookPlanningResult;
    grdPlanning.Columns[grdPlanning.Columns.Count - 1].ReadOnly = false;
    grdPlanning.DataBind();
}

Thanks


Answers (3)