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.
ASPxGridView - ASPxPopupControl is placed behind the PopupEditForm template
Answers
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
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!!!
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.
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>