Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 528.3k

Textbox column at the end

May 19 2023 11:55 AM

Hi

   In a Gridview i want to add Textbox column at the end & then read its value. Below is the code. AutoGenerateColumns is true

 DataTable dt = sQLUtility.GeBookPlanningRecommendation(HRpl, BookCollection, StudentCollection).Tables[0];
                if (dt != null)
                {
                    DataColumn Remarks = new DataColumn("Remarks", typeof(string));
                    dt.Columns.Add(Remarks);
grdPlanning.DataSource = dt;
                    grdPlanning.DataBind();
                }
<asp:GridView ID="grdPlanning" class="table table-bordered" runat="server" OnRowDataBound="gr_RowDataBound" OnRowCommand="grdPlanning_RowCommand" AutoGenerateColumns="true">
</asp:GridView>

Thanks


Answers (1)