Modal Popup Extender Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • malav123
    New Member
    • Feb 2008
    • 217

    Modal Popup Extender Problem

    Hi,
    I am using ajax's model popup extender and gridview with last column of image, My requirement is the model popup opens when i clicks on the image of particular row, but when i gives "TargetId" of model popup as image id, i am getting error that imgid is not accessible... How to Access model popup by clicking on image of gridview ? and how to access the gridview's control...?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    This looks suspiciously like a .NET problem, but even so, no-one can help without some code.

    Also, do you mean "modal" as opposed to "model"?

    Comment

    • malav123
      New Member
      • Feb 2008
      • 217

      #3
      Originally posted by acoder
      This looks suspiciously like a .NET problem, but even so, no-one can help without some code.

      Also, do you mean "modal" as opposed to "model"?

      Yes it is Modal Popup Extender... And it is ajaxControllToo lkit's control... If i simply want to open modal popup from linkbutton then it works but at the same time if i put the same link button in the gridview then it says linkbutton is not accessible... so tell me which code you want to see then i will post...

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Post the code that causes the problem (the link button in the gridview), but I can only help if you post HTML/JavaScript code. If you're going to post .NET code, I'll move this thread to the .NET forum.

        Comment

        • malav123
          New Member
          • Feb 2008
          • 217

          #5
          Originally posted by acoder
          Post the code that causes the problem (the link button in the gridview), but I can only help if you post HTML/JavaScript code. If you're going to post .NET code, I'll move this thread to the .NET forum.


          My code is given below which contains the "image tag" in gridview...
          Code:
           
          <asp:GridView ID="grdOfficerLead" runat="Server" AllowSorting="true" AutoGenerateColumns="false"
                      HeaderStyle-CssClass="themeGridHeader" RowStyle-CssClass="gridborder" Width="100%"
                       GridLines="Horizontal" HeaderStyle-ForeColor="white" EmptyDataText="No Data Found">
                      <Columns>
                          <asp:BoundField DataField="id" Visible="false" />
                          <asp:BoundField DataField="insertDate" HeaderText="Created" SortExpression="insertDate" />
                          <asp:BoundField DataField="FName" HeaderText="FName"  SortExpression="FName" />
                          <asp:BoundField DataField="LName" HeaderText="LName" SortExpression="LName" />
                          <asp:BoundField DataField="WorkPhone" HeaderText="WorkPhone" />
                          <asp:BoundField DataField="PurchasePrice" HeaderText="Amount" />
                          <asp:BoundField DataField="MortgageType" HeaderText="Purpose" SortExpression="MortgageType" />
                          <asp:BoundField DataField="CbStatus" HeaderText="Staus" SortExpression="CbStatus" />
                          <asp:TemplateField HeaderText="Action">
                              <ItemTemplate>
                                  <asp:LinkButton ID="lnkOfficerLead"   Text="Details" runat="server" CommandArgument='<%#Eval("id") %>' OnClick="ShowOfficerLead"></asp:LinkButton>
                              </ItemTemplate>
                          </asp:TemplateField>
                
                          <asp:TemplateField>
                              <ItemTemplate>
                               <div> <asp:Image id="imgGrid" runat="Server" ImageUrl="../../images/7.jpg" /></div></ItemTemplate>
                          </asp:TemplateField>
                          
                 </Columns>
                      </asp:GridView>

          Comment

          • malav123
            New Member
            • Feb 2008
            • 217

            #6
            Originally posted by acoder
            Post the code that causes the problem (the link button in the gridview), but I can only help if you post HTML/JavaScript code. If you're going to post .NET code, I'll move this thread to the .NET forum.


            And my ajax's modal popup i am using is given below,
            Code:
            <cc1:ModalPopupExtender ID="ModalPopupExtender" runat="server"  TargetControlID="imgGrid" PopupControlID="Panel1" BackgroundCssClass="modalBackground" 
            OkControlID="OkButton" DropShadow="true" CancelControlID="CancelButton"   />

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              You'll have better luck in the .NET forum. Moved to .NET.

              Moderator.

              Comment

              • malav123
                New Member
                • Feb 2008
                • 217

                #8
                Originally posted by acoder
                You'll have better luck in the .NET forum. Moved to .NET.

                Moderator.
                Thanks for Response....
                And i got solution now that i have put modal popup also in the gridview that's why the gridview's controlls are accessible....

                Thanks again....

                Comment

                Working...