Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.7k

Disable column in Gridview

May 6 2023 2:33 AM

Hi

  I want if value in Gridview column is 'D' or 'S' then SessionDate should be disabled

<asp:GridView ID="grdPlanning" class="table table-bordered" runat="server" OnRowDataBound="gr_RowDataBound" 
                                            onsorting="grdPlanning_Sorting" AllowSorting="True"  DataKeyNames="BookID" >
                                            <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>

Thanks


Answers (4)