New combobox inside Modalpopup not showing correctly

Last post 07-04-2009 6:38 AM by SMuhilan. 4 replies.

Sort Posts:

  • New combobox inside Modalpopup not showing correctly

    05-24-2009, 4:12 PM
    • Member
      4 point Member
    • Pjotr1001
    • Member since 08-11-2008, 8:56 PM
    • Posts 4

     Perhaps I'm missing something here, but I can't get this to work.

    I've put an Ajax combobox inside a panel with a Modalpopupextender. When the panel opens, it shows the combox, but the button on the right is missing. At first i thought it had something to do with my CSS, but when i move the combobox outside the popuppanel, everything works fine.

     I've tested this in both IE7 and Firefox 3

    any help would be apreciated

     here is the code:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

    <%@ 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>Untitled Page</title>
       
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <cc1:ModalPopupExtender ID="MPE" runat="server" PopupControlID="panel" TargetControlID="LB"></cc1:ModalPopupExtender>
            <asp:Panel ID="panel" runat="server" style="display:none">
                <cc1:ComboBox ID="ComboBox1" runat="server"
                    AutoPostBack="true"
                    DropDownStyle="DropDown">
                    <asp:ListItem Value="0" Text="1" >Text 1</asp:ListItem>
                    <asp:ListItem Value="1" Text="2">Text 2</asp:ListItem>
                    <asp:ListItem Value="2" Text="3">Text 3</asp:ListItem>
                </cc1:ComboBox>
            </asp:Panel>
            <h1><asp:LinkButton ID="LB" runat="server" style="font-size:40px; color:Red;" Text="clickme">click</asp:LinkButton></h1>
        </form>
    </body>
    </html>

  • Re: New combobox inside Modalpopup not showing correctly

    05-28-2009, 3:10 AM
    Answer

    Hi,

    Please check this reference: http://vincexu.blogspot.com/2009/05/ajaxcontroltoolkit-combobox-not.html 

     Please put the ModalPopup behind Panel.

     


    Vince Xu
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: New combobox inside Modalpopup not showing correctly

    05-31-2009, 2:35 PM
    • Member
      4 point Member
    • Pjotr1001
    • Member since 08-11-2008, 8:56 PM
    • Posts 4

    Sorry, I red the article and tried the solution, but it's stil not working. I can see de textbox, but the button on the left is shown as a litte grey square, about 3 by 3 pixels in size. I can click it but it won't open the dropdownlist. Please put my code in a defaul aspx file and try it yourself, it aint working.

  • Re: New combobox inside Modalpopup not showing correctly

    05-31-2009, 10:47 PM

    Hi,

    I've made a mistake in my blog article. I modified it. You can check it again.

    After my reseaching, besides putting the ModalPopup behind Panel, we need set the panel as display=block or remove display style.


    Vince Xu
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: New combobox inside Modalpopup not showing correctly

    07-04-2009, 6:38 AM
    • Member
      5 point Member
    • SMuhilan
    • Member since 02-23-2007, 10:44 PM
    • Posts 29

    hi

    I am facing same problem in tab container. How to resolve it?

    Regards

    S. Muhilan
    Here is my code 

     

    <form id="form1" runat="server"><asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager> 
    <div> 
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="228px" Width="400px"> 
    <ajaxToolkit:TabPanel ID="tabpane1" runat="server" HeaderText="tab1"> <HeaderTemplate> Tab 1</HeaderTemplate> 
    <ContentTemplate> 
    <br /> 
    <ajaxToolkit:ComboBox runat="server" ID="ComboBox1" MaxLength="100" AutoCompleteMode="Suggest" > 
    <asp:ListItem Text="ABC" Value="ABC"></asp:ListItem> 
    <asp:ListItem Text="XYZ" Value="XYZ"></asp:ListItem> 
    </ajaxToolkit:ComboBox> 
    </ContentTemplate> 
    </ajaxToolkit:TabPanel> 
    <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Tab2" >
    <HeaderTemplate>
    Tab 2
    </HeaderTemplate>
    <ContentTemplate> 
    <br /> 
    <ajaxToolkit:ComboBox runat="server" ID="ComboBox4" MaxLength="100" AutoCompleteMode="Suggest">
    <asp:ListItem Text="ABC" Value="ABC"></asp:ListItem>
    <asp:ListItem Text="XYZ" Value="XYZ"></asp:ListItem>
    </ajaxToolkit:ComboBox>  
    </ContentTemplate> 
    </ajaxToolkit:TabPanel> 
    </ajaxToolkit:TabContainer> 
    </div>  <br/> 
    </form>

    --------

    For 1st tab the dropdown button is shown . But for the 2nd tabe the dropdown button is not shown. When I set autopostback =true for tabs, it is whowing correctlly.

     

Page 1 of 1 (5 items)