Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 527.9k

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)