I've put a WebDropDown inside a panel which has the ModalPopupExtender on it and bound the drop down to an array. When I view the page, I can't get the dropdown to dropdown. Pressing the up and down arrows does scroll through the list of options, but clicking the down arrow does not cause the dropdown list to show. Thanks for any ideas.
Hi,
you can try setting the DropDownContainerHeight property to some fixed value, like 200px , although in general it should work well without it. Please let me know if this works for your scenario. Also , there is the EnableDropDownAsChild property (taking true / false values) , which controls whether the dropdown container element will be a direct first child of the source element - in the DOM ; or will be detached from it, absolutely positioned and its position calculated as soon as the container is about to be opened.
Any other feedback you may have for the WebDropDown component is welcome - Does it suit your needs? If you feel specific features could be improved, modified, or added, please let us know.
Thanks very much,
Angel
Neither of the options you listed made a difference. I did create a test page a dropped the webpulldown on it and it worked ok, so I think the issue is the pulldown being in a modal popup panel.
With EnableDropDownAsChild set to False, when I clicked on the pulldown arrow, the scrollbars for the screen showed but I couldn't find the actual pulldown items.
I should also mention that a WebCombo works fine, but I was hoping to replace it with the WebPullDown.
thanks
I have created a sample ASPX page, with the following contents, and the Dropdown seems to appear correctly:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Infragistics35.Web.v9.1, Version=9.1.20091.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.Web.UI.ListControls" TagPrefix="ig" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server"></asp:ScriptManager>
<div>
<asp:Button ID="Button1" runat="server" Text="show popup" />
<asp:Panel runat="server" ID="WebDropDownPanel1" Width="400px" Height="400px" BackColor="Green">
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px">
</ig:WebDropDown>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" PopupControlID="WebDropDownPanel1">
</cc1:ModalPopupExtender>
</div>
</form>
</body>
</html>
I'm having a similar issue - I have the WebDropDown inside a WebDialogWindow. I've tried all the various suggestions in this thread, but none seem to work. The values are loaded, and I can select the WebDropDown and change the value by using the arrow keys, but the dropdown does not appear at all.
Could you please show me some of your code ? I will take a look and see what i can do. By the way, if you only click in the input , and use the arrow keys, the dropdown will not automatically open - no matter whether it is standalone or in some container like WebDialogWindow. When the WebDropDown is inside a WebDialogWindow, and you click the dropdown button, or use the keyboard to open it (ALT + down arrow key), does it open?
Thanks for the feedback,
Here you go... Not sure if it matters, but the items in the WebDropDown are currently being added by using the .Items.Add(New Infragistics.Web.UI.ListControls.DropDownItem() method.
<ig:WebDialogWindow id="dialogACC" runat="server" width="550px" height="350px" left="380px" top="155px" stylesetname="Caribbean" windowstate="hidden" modal="true" > <header font-size="Medium" captiontext="Acc"></header> <contentpane cssclass="EditDialogWindow"> <template > <div style="text-align:center;"> <igmisc:WebGroupBox ID="wgrpAccP" runat="server" Text="Acc" StyleSetName="Caribbean" a BorderStyle="Groove" BorderWidth="2"> <Template> <br /> <asp:TextBox ID="txtAccY" runat="server" Enabled="false" Text="test"></asp:TextBox> <br /><br /> </Template> </igmisc:WebGroupBox> </div> <table> <tr> <td style="padding-top: 8px; padding-left: 10px" colspan="2"></td> <td></td> </tr> <tr> <td style="padding-top: 8px; padding-left: 10px">PRO</td> <td style="width: 153px; padding-top: 8px" align="right"> <ig:WebDropDown ID="ddnACC" runat="server" > </ig:WebDropDown> </td> <td></td> </tr> </table> </template> </contentpane> </ig:WebDialogWindow>
you are absolutely right, with this markup, the dropdown doesn't open. The problem seems to be in the <TD> container of the dropdown having align="right". If align="right" is not used, it works fine.
If you use style="float:right;" instead of align="right" for the TD which hosts the WebDropDown, it works property as well - it has the same effect.
I hope this helps,
Thanks a lot, today you're my hero.
Hi revbones,
I took another look, and I think i found the issue (it's not about the TD's align=right) . The dropdown cannot be seen because the modal WebDialogWindow sets its z-index to a very high number, so that it can be always displayed on top - therefore the dropdown is displayed behind the dialog window. The solution is to set the dropdown container's z-index to a higher value than the z-index of the modal WebDialogWindow (which is by default 100 000).
I have attached a sample project (WebSite) - you can take a look at Default2.aspx, which uses your code, and the dropdown can be displayed correctly, after the modal WebdialogWindow is shown. Note the WebDropDown's Initialize ClientSideEvent handler, which sets the z-index of the dropdown . Also we need to make sure that EnableDropDownAsChild=false, so that the dropdown container will be absolutely positioned - another prerequisite for it being displayed above the modal dialog window.
<ClientEvents Initialize="initDropDown" />
Then in the handler I do :
function initDropDown(sender,args)
{
sender.behavior.set_zIndex(200000);
}
and then in the WebDropDown declaration in the aspx: EnableDropDownAsChild=false
Apart from that the only modification I have made is to also set a Width for the dropdown , but it also works without it.
Hope it helps,
It still doesn't work for me, using 'float:right' or taking out the 'align' entirely. That code is in a webcontrol if it makes any difference.