Hi
I have below Gridview. There is value in Session Date but it is showing ""
<div class="table-responsive"> <asp:GridView ID="grdPlanning" class="table table-bordered" runat="server" OnRowDataBound="gr_RowDataBound" OnRowCommand="grdPlanning_RowCommand" AutoGenerateColumns="true"> <Columns> <asp:TemplateField HeaderText="Session Date"> <ItemTemplate> <asp:TextBox ID="txtSessionDate" runat="server" CssClass="form-control daterange-single" Text=''></asp:TextBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </div>
foreach (GridViewRow gr in grdPlanning.Rows) { if (gr.RowType == DataControlRowType.DataRow) { if (gr.Cells[0].Enabled == true) { sessionDate = (gr.FindControl("txtSessionDate") as TextBox).Text.Trim(); } } }
Thanks