Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Modal pop up not working when gridview has more than one row

$
0
0

Hi,

Below is my code for item template.

<ItemTemplate>
<asp:LinkButton ID="Document_LB" runat="server" Text='<%# Bind("CCLD_Document") %>'
CommandName="View_Document" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>
<asp:LinkButton ID="Doc_Hide_LB" runat="server" Style="display: none">LinkButton</asp:LinkButton>
<asp:ModalPopupExtender ID="Doc_ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground"
TargetControlID="Doc_Hide_LB" PopupControlID="View_Doc_Panel" OkControlID="View_Doc_Close_LB"
DropShadow="true" Enabled="True">
</asp:ModalPopupExtender>
</ItemTemplate>

Panel code is provided below:

<asp:Panel ID="View_Doc_Panel" runat="server" Height="400px" Width="600px" ScrollBars="Auto"
BackColor="#F0F0F0" Style="display: none">
<div align="right">
<asp:LinkButton ID="View_Doc_Close_LB" runat="server" ForeColor="Black">X</asp:LinkButton>
</div>
<br />
<div align="center">
<asp:GridView ID="CCLD_View_Document_GridView" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Document Name" ShowHeader="False" HeaderStyle-HorizontalAlign="center"
ItemStyle-Wrap="true" ItemStyle-Font-Size="Small" ControlStyle-Font-Size="Small"
HeaderStyle-Font-Size="Small" Visible="false">
<ItemTemplate>
<asp:Label ID="CCLD_FullPath" runat="server" Text='<%# Bind("CCLD_Doc_Path") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Document Name" ShowHeader="False" HeaderStyle-HorizontalAlign="center"
ItemStyle-Wrap="true" ItemStyle-Font-Size="Small" ControlStyle-Font-Size="Small"
HeaderStyle-Font-Size="Small" Visible="True">
<ItemTemplate>
<asp:LinkButton ID="Doc_Name" runat="server" Text='<%# Bind("CCLD_Doc_Name") %>'
CommandName="CCLD View Document" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</asp:Panel>

Code to show the modalpopup:

Dim Document_LB As LinkButton
Document_LB = RCCL_GridView.Rows(e.CommandArgument).FindControl("Document_LB")
Dim ModalPopupExtender As ModalPopupExtender
ModalPopupExtender = RCCL_GridView.Rows(e.CommandArgument).FindControl("Doc_ModalPopupExtender")
ModalPopupExtender.TargetControlID = "Document_LB"
ModalPopupExtender.Show()

But when I debug the application and click on the linkbutton modalpopup is not shown.

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>