Ajax工具包:ComboBox + AjaxToolkit:ModalPopupExtender -- ComboBox 下拉列表被切断...如何修复?

发布于 2024-12-17 19:17:52 字数 1753 浏览 4 评论 0原文

基本上,我有以下问题:

.AjaxComboBoxWindowsStyle
{
    position: relative;
}

.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer, .AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer
{
    padding: 0 !important;
}

.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer input
{
    margin: 0;
    border: solid 1px #7F9DB9;
    border-right: 0px none;
    padding: 0px 0px 0px 0px;
    font-size: 13px;
    height: 19px !important;
}
.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button
{
    margin: 0;
    padding: 0;
    background-image: url(Img/ComboBox/windows-arrow.gif);
    background-position: top left;
    border: 0px none;
    height: 21px !important;
    width: 21px !important;
}
.AjaxComboBoxWindowsStyle .ajax__combobox_itemlist
{
    border-color: #7F9DB9;
    position: absolute !important;
    left: -173px !important;
    top: 22px !important;
    width: 171px !important;
}

<asp:Panel id="divItem" class="lrgModalWrap" style="display: block;" runat="server">
                    <ajaxToolkit:ComboBox ID="cmbEmployees" CssClass="AjaxComboBoxWindowsStyle" runat="server" AutoPostBack="False" DropDownStyle="DropDown" AutoCompleteMode="SuggestAppend" 
                    CaseSensitive="False" ItemInsertLocation="Append" MaxLength="32" />
</asp:Panel>

<ajaxToolkit:ModalPopupExtender ID="mpeParcel" BackgroundCssClass="modalBgd" CancelControlID="lbtnCancelParcel" TargetControlID="hdnItem" PopupControlID="divItem" runat="server" />

问题是组合框下拉列表切断了弹出模型底部的位置...弹出模式中的组合框部分正确呈现,但其余部分则不然。

奇怪的是,标准 DropdownList(选择)可以正确呈现。

Basically, I've got the following:

.AjaxComboBoxWindowsStyle
{
    position: relative;
}

.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer, .AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer
{
    padding: 0 !important;
}

.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_textboxcontainer input
{
    margin: 0;
    border: solid 1px #7F9DB9;
    border-right: 0px none;
    padding: 0px 0px 0px 0px;
    font-size: 13px;
    height: 19px !important;
}
.AjaxComboBoxWindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button
{
    margin: 0;
    padding: 0;
    background-image: url(Img/ComboBox/windows-arrow.gif);
    background-position: top left;
    border: 0px none;
    height: 21px !important;
    width: 21px !important;
}
.AjaxComboBoxWindowsStyle .ajax__combobox_itemlist
{
    border-color: #7F9DB9;
    position: absolute !important;
    left: -173px !important;
    top: 22px !important;
    width: 171px !important;
}

<asp:Panel id="divItem" class="lrgModalWrap" style="display: block;" runat="server">
                    <ajaxToolkit:ComboBox ID="cmbEmployees" CssClass="AjaxComboBoxWindowsStyle" runat="server" AutoPostBack="False" DropDownStyle="DropDown" AutoCompleteMode="SuggestAppend" 
                    CaseSensitive="False" ItemInsertLocation="Append" MaxLength="32" />
</asp:Panel>

<ajaxToolkit:ModalPopupExtender ID="mpeParcel" BackgroundCssClass="modalBgd" CancelControlID="lbtnCancelParcel" TargetControlID="hdnItem" PopupControlID="divItem" runat="server" />

The problem is that the ComboBox dropdown list cuts off where the popup model's bottom ends... the combobox portion in the popup modal renders properly, but the rest doesn't.

Oddly enough, a standard DropdownList (selection) renders properly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-柠檬树下少年和吉他 2024-12-24 19:17:52

这可能是与 z-index 相关的问题,其中正在渲染的 ComboBox 没有被设置得足够向前,无法重叠在正在显示的模式弹出窗口的顶部。

查看我遇到的与 Ajax Calendar Extender 相关的类似问题 并且您应该能够对其应用相同的样式以使其正确显示。

This is probably a z-index related issue, where the ComboBox being rendered is not being set forward enough to be able to overlap on top of the modal popup being displayed.

Check out a similar issue I had relating to the Ajax Calendar Extender and you should be able to apply the same styling to it to allow it to display properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文