Ticket Q346044
Visible to All Users

ASPxGridView - ASPxPopupControl is placed behind the PopupEditForm template

created 14 years ago

Hi team.
I call ASPxPopupControl from EditForm template of ASPxGridView.
ASPxPopupControl is located outside of EditForm template and called from the click on ASPxButtonEdit button.
Everything works alright except ASPxPopupControl appears in front of EditForm and in a split of second goes behind EditForm.
I tried to do the same call to popup by using just GridViewDataButtonEditColumn and the same
<clientsideevents ButtonClick="function(s, e) {PopupAddressBook1.Show();}" />
In this case Popup stays in front of everything else as it should be.
So in the end I have two identically looking controls (ASPxButtonEdit) on the EditForm and calling the same ASPxPopupControl.
The popup Called by 1st one ends up behind, called from the other one stay in front.
The thing is that I need to use ASPxButtonEdit on template (the one that sends popup behind) because the popup and the editform are quiet complex and I need to select a lot of values from popup and pass them to many controls on editform, which would be much either to do with standalone controls than dealing with grid columns.
Also I know that if I move popup inside of EditForm then it fixes the problem, but I would like to reuse the same popup because it is already working with few other controls which are located outside of EditForm. So I'd like to reduce the size of the file by sharing this control because as I mentioned it is a complex one and having it doubled on the form is not good.
Could you give me a hint what might cause such a behavior of popup?
Thank you.

Comments (3)
DevExpress Support Team 13 years ago

    Hi Alex,
    Thank you for contacting us. I am afraid I do not quite understand what you mean by the following: ASPxPopupControl appears in front of EditForm and in a split of second goes behind EditForm. Do you mean that ASPxPopupControl is shown and hereon is hidden? If so, check the ASPxButtonEdit.AutoPostBack property value. It should be set to false.
    Perhaps, you mean that ASPxPopupControl appears at a wrong location. In this case, I recommend that you call an instance of the ShowAtPos or ShowWindowAtElement methods rather than the ASPxClientPopupControl.Show one.
    Let us know if either of the recommendations help you resolve the issue. If not, please send us your markup and a screencast that illustrates the incorrect behavior.
    Thanks,
    Marion

      Here is what I am talking about. (see attached pic).
      I tried ShowWindowAtElement methods. Didn't help.
      Here is markup:
      <dx:ASPxGridView ID="ASPxGridViewUsage" runat="server"
                                                      AutoGenerateColumns="False" ClientIDMode="AutoID"
                                                      ClientInstanceName="ASPxGridViewUsage"
                                                      CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx"
                                                      DataSourceID="SqlDataSourceAppointmentUsage" EnableCallBacks="False"
                                                      Font-Names="Verdana" Font-Size="8pt" KeyFieldName="UsageID"
                                                      Width="1250px">
                                     …
      <Columns>
                                     …
      <dx:GridViewDataButtonEditColumn Caption="Invoice To" FieldName="BillingClientName" Name="BillingClientName"
                                                              VisibleIndex="12" Width="400px" Visible="False">
                                                              <PropertiesButtonEdit ClientInstanceName="UsageInvoiceToClientName">
                                                              <clientsideevents ButtonClick="function(s, e) {PopupAddressBook1.Show();}" />
                                                              <Buttons>
                                                                  <dx:EditButton Position="Right" ToolTip="Select Client">
                                                                  </dx:EditButton>
                                                              </Buttons>
                                                              </PropertiesButtonEdit>
                                                              <EditFormSettings Visible="true" VisibleIndex="12"/>
                                                          </dx:GridViewDataButtonEditColumn>
                                                              …
      <Templates>
      <editform>
                                                              <div style="padding: 4px 4px 3px 4px">
                                                                  <dx:ASPxGridViewTemplateReplacement ID="Editors" runat="server"
                                                                      ReplacementType="EditFormEditors" />
                                                              </div>
                                                              <div style="padding: 4px 4px 3px 4px">
                                                                  <dx:ASPxButtonEdit ID="ASPxButtonEditUsageInvoiceToClientName" runat="server"
                                                                      ClientIDMode="AutoID" ClientInstanceName="ASPxButtonEditUsageInvoiceToClientName"
                                                                      CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange"
                                                                      ReadOnly="True" SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css"
                                                                      OnButtonClick="ASPxButtonEditUsageInvoiceToClientName_ButtonClick"
                                                                      Width="300px" Text='<%# Eval("BillingClientName") + ""%>'>
                                                                      <clientsideevents ButtonClick="function(s, e) {PopupAddressBook1.ShowAtElement(this);}" />
                                                                      <buttons>
                                                                          <dx:EditButton>
                                                                          </dx:EditButton>
                                                                      </buttons>
                                                                  </dx:ASPxButtonEdit>
                                                              </div>
                                                              <div style="text-align: right; padding: 4px 4px 3px 4px">
                                                                  <dx:ASPxGridViewTemplateReplacement ID="UpdateButton" runat="server"
                                                                      ReplacementType="EditFormUpdateButton" />
                                                                  <dx:ASPxGridViewTemplateReplacement ID="CancelButton" runat="server"
                                                                      ReplacementType="EditFormCancelButton" />
                                                              </div>
                                                          </editform>
                                         …
      The popup that is called from GridViewDataButtonEditColumn gets the right position.
      The same popup called from template ASPxButtonEdit gets the position shown in attached screenshot.
      thanks

        correction
        The code above should have AutoPostBack="false" in the part of ASPxButtonEdit on template.
        But still popup goes under EditForm as shown in attached image
        <dx:ASPxButtonEdit ID="ASPxButtonEditUsageInvoiceToClientName" runat="server"
                                                                                    ClientIDMode="AutoID" ClientInstanceName="ASPxButtonEditUsageInvoiceToClientName"
                                                                                    CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange"
                                                                                    ReadOnly="True" SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css"
                                                                                    OnButtonClick="ASPxButtonEditUsageInvoiceToClientName_ButtonClick"
                                                                                    Width="300px" Text='<%# Eval("BillingClientName") + ""%>' AutoPostBack="false">
                                                                                    <clientsideevents ButtonClick="function(s, e) {PopupAddressBook1.ShowAtElement(this);}" />
                                                                                    <buttons>
                                                                                        <dx:EditButton>
                                                                                        </dx:EditButton>
                                                                                    </buttons>
                                                                                </dx:ASPxButtonEdit>

        Answers

        created 13 years ago

        Hello Alex,
        Thank you for sending us a descriptive screenshot. It helped me understand the issue better. By design, ASPxPopupControl has a large z-index attribute value so that the control is shown over other controls located on a page.
        In fact, ASPxGridView's PopupEditForm is placed inside ASPxPopupControl. In seems that both popup controls' z-indexes contradict each other. I suggest that you set the PopupAddressBook1's z-index to a value greater than 12000. Try this solution and let me know whether or not this helps you resolve the issue.
        Thanks,
        Marion

          Show previous comments (4)
          DevExpress Support Team 13 years ago

            Alex, you are welcome!

              I have the same problem, I set the z-index of the popupcontrol to > 12000 but when the edit form shows the popupcontrol, it always has the z-index 12000. How can I fix this problem!!!

              DevExpress Support Team 7 years ago

                Hello Daniel,

                I've created a separate ticket on your behalf (T664070: ASPxGridView - The z-index property of the popup edit form is always 12000 even it is changed). It has been placed in our processing queue and will be answered shortly.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.