Panel Visible True False not working after add dropdownlist inside the updatepanel

Last Reply 5 days ago By kalpesh

Posted 6 days ago

Hi, All of you. Panel Visible True False not working after add dropdownlist inside the updatepanel. My dropdownlist is autopostback =true and I am performing action on dropdownlist selected indexed chanegd. I am visibleing true false panel on this event but after add dropdowlist in updatepanle it's not working.

You are viewing reply posted by: kalpesh 5 days ago.
Posted 5 days ago

HTML

Try to add Updeate panel to panel as well as to AjaxFileUplaodcontrol.

<asp:Button ID="btnShowPopup" Style="display: none" runat="server" />
<ajaxt:ModalPopupExtender ID="ctlModalPopupExtender" runat="server" TargetControlID="btnShowPopup"
    PopupControlID="pnlpopup" CancelControlID="imgOK" BackgroundCssClass="modalBackground">
</ajaxt:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" Width="817px" Height="600px" ScrollBars="Auto">
    <table style="background-color: white; text-align: left" width="800px" class="grid_uplod">
        <tr>
            <th valign="middle" colspan="2" align="center" bgcolor="#FFFFFF" style="font-weight: bold;
                font-size: larger">
                <asp:ImageButton ID="imgOK" ImageUrl="~/images/close.gif" Height="20" Width="20"
                    runat="server" ImageAlign="Right" />
            </th>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td style="text-align: left;">
                Nature of Complaint :
            </td>
            <td style="text-align: left;">
                <asp:TextBox ID="txtNatureofComplaint" runat="server" class="form-control"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="text-align: left;">
                Brief Write Up :
            </td>
            <td style="text-align: left;">
                <asp:TextBox ID="txtBriefWriteUp" runat="server" class="form-control"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="text-align: left;">
                Remedial Action :
            </td>
            <td style="text-align: left;">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
                    <ContentTemplate>
                        <asp:DropDownList ID="DDLRemedialAction" runat="server" class="form-control" AutoPostBack="true"
                            OnSelectedIndexChanged="DDLRemedialAction_SelectedIndexChanged">
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="DDLRemedialAction" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="Center">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
                    <ContentTemplate>
                        <asp:Panel ID="PnlRemedialActionCR" runat="server" Visible="false">
                            <asp:GridView ID="gvRemedialActionCR" runat="server" AutoGenerateColumns="false"
                                CssClass="ChildGrid" Width="100%" OnRowDataBound="gvRemedialActionCR_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="vMaterialcode" HeaderText="Material Code" HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="vMaterialdec" HeaderText="Material Desc." HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Invoice Qty" ItemStyle-Width="100px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvInvoiceQty" runat="server" Text='<%# Eval("InvoiceQty") %>'
                                                class="form-control" Style="text-align: right;" Enabled="false" Width="100px"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Complaint Qty" ItemStyle-Width="100">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvComplaintQty" runat="server" Text='<%# Eval("ComplaintQty") %>'
                                                class="form-control" Style="text-align: right;"></asp:TextBox>
                                            <asp:HiddenField ID="hdngvCode" runat="server" Value='<%# Eval("vCode") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="nRate" HeaderText="Rate" HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Amount" HeaderText="Amount" HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="GSTAmount" HeaderText="GST" HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Code" ItemStyle-Width="100" Visible="false">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvCode" runat="server" Text='<%# Eval("vCode") %>' class="form-control"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
                        <asp:Panel ID="PnlRemedialActionRE" runat="server" Visible="false">
                            <asp:GridView ID="gvRemedialActionRE" runat="server" AutoGenerateColumns="false"
                                CssClass="ChildGrid" Width="100%" OnRowDataBound="gvRemedialActionRE_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="vMaterialcode" HeaderText="Material Code" HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="vMaterialdec" HeaderText="Material Desc." HeaderStyle-HorizontalAlign="Left">
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Invoice Qty" ItemStyle-Width="100px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvInvoiceQty" runat="server" Text='<%# Eval("InvoiceQty") %>'
                                                class="form-control" Style="text-align: right;" Enabled="false" Width="100px"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Complaint Qty" ItemStyle-Width="100px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvComplaintQty" runat="server" Text='<%# Eval("ComplaintQty") %>'
                                                class="form-control" Style="text-align: right;" Width="100px"></asp:TextBox>
                                            <asp:HiddenField ID="hdngvCode" runat="server" Value='<%# Eval("vCode") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Code" ItemStyle-Width="100" Visible="false">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtgvCode" runat="server" Text='<%# Eval("vCode") %>' class="form-control"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
                        <asp:Panel ID="PnlRemedialActionOTH" runat="server" Visible="false">
                            <asp:TextBox ID="txtREOther" runat="server" TextMode="MultiLine" Height="50" Style="resize: none;"
                                class="form-control" placeholder='Please specify.'></asp:TextBox>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td>
                Attachment :
            </td>
            <td>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <ajaxt:AjaxFileUpload ID="AjaxFileUpload11" runat="server" MaximumNumberOfFiles="5"
                            Width="400px" OnUploadComplete="OnUploadComplete" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="BtnSubmit" runat="server" Text="Submit" class="btn btn-primary" OnClientClick="return ValidatePOPup()"
                    OnClick="BtnSubmit_Click" />
            </td>
        </tr>
    </table>
</asp:Panel>

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html