i have a cambobox in my application but it doesnt render properly. I dont se the arrow dow end neither the drop down values. I have the combobox insida a tabcointainer that is located in another tabcontainer that is located in a accordion. Any idés?
This issue is attributable to the tabpanel which is not active is invisible, combobox can't get the correct offsetHeight and offsetWidth any more.
So, the approach to resolve it is setting the TabPanel to be visible so that combobox can create in gear. Combobox will be created in initialized phase. So we have to set TabPanel to be visible before combobox creates and set it back in pageLoad phase.
The tab cointiner is also in an accoirdion.. But when i add your java script all the comboboxes is hidden and when i change tab and back to my tab the comboboxes is there again but with the old fault. If i push a button the comboboxes looks ok after that...
Ollza
Member
572 Points
304 Posts
Combobox ldoesnt render correctly
Apr 17, 2012 02:02 PM|LINK
Hi
i have a cambobox in my application but it doesnt render properly. I dont se the arrow dow end neither the drop down values. I have the combobox insida a tabcointainer that is located in another tabcontainer that is located in a accordion. Any idés?
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Combobox ldoesnt render correctly
Apr 18, 2012 03:20 AM|LINK
Hi, Please refer this
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx and http://www.asp.net/ajaxLibrary/act_ComboBox.ashx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Ollza
Member
572 Points
304 Posts
Re: Combobox ldoesnt render correctly
Apr 18, 2012 08:25 AM|LINK
Doesnt say anything about that problem on thoose links.
Song-Tian - ...
All-Star
43699 Points
4304 Posts
Microsoft
Re: Combobox ldoesnt render correctly
Apr 19, 2012 05:14 AM|LINK
Hi,
Please post the related code.
Feedback to us
Develop and promote your apps in Windows Store
Ollza
Member
572 Points
304 Posts
Re: Combobox ldoesnt render correctly
Apr 19, 2012 07:35 AM|LINK
Here it comes. It is when it is in the nestred tabcointener it stop wroking.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FIA2.aspx.cs" Inherits="FIA.FIA2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" EnableScriptLocalization="true" EnablePageMethods="true"> <Scripts> </Scripts> </cc1:ToolkitScriptManager> <div id="fiaContainer"> <cc1:TabContainer runat="server" ID="tcMain" Height="1200px" ActiveTabIndex="0"> <cc1:TabPanel ID="tpStart" HeaderText="Start" runat="server"> <ContentTemplate> <asp:Panel runat="server" ID="pnlInformation"> </asp:Panel> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="tpForecast" HeaderText="Ho ho" runat="server"> <ContentTemplate> <asp:Panel runat="server" ID="pnlhohoh"> <asp:Label runat="server" ID="lblHOHO" Text="ho ho ho" /> <br /> <asp:TextBox ID="txtmmm" runat="server" ReadOnly="true" /> <br /> <br /> <br /> <br /> </asp:Panel> <cc1:TabContainer runat="server" ID="tc123" Height="1100px" ActiveTabIndex="0"> <cc1:TabPanel ID="tpabc" HeaderText="ABC" runat="server"> <ContentTemplate> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="tp123" HeaderText="123" runat="server"> <ContentTemplate> <cc1:ComboBox runat="server" ID="ddlBla" AutoCompleteMode="SuggestAppend" DropDownStyle="DropDown" DataTextField="0" Width="200px"> </cc1:ComboBox> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer> </div> </form> </body> </html>Song-Tian - ...
All-Star
43699 Points
4304 Posts
Microsoft
Re: Combobox ldoesnt render correctly
Apr 19, 2012 09:07 AM|LINK
Hi,
This issue is attributable to the tabpanel which is not active is invisible, combobox can't get the correct offsetHeight and offsetWidth any more.
So, the approach to resolve it is setting the TabPanel to be visible so that combobox can create in gear. Combobox will be created in initialized phase. So we have to set TabPanel to be visible before combobox creates and set it back in pageLoad phase.
Please change your code as follow:
<body> <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" EnableScriptLocalization="true" EnablePageMethods="true"> </asp:ToolkitScriptManager> <div id="fiaContainer"> <asp:TabContainer runat="server" ID="tcMain" Height="1200px" ActiveTabIndex="0"> <asp:TabPanel ID="tpStart" HeaderText="Start" runat="server"> <ContentTemplate> <asp:Panel runat="server" ID="pnlInformation"> </asp:Panel> </ContentTemplate> </asp:TabPanel> <asp:TabPanel ID="tpForecast" HeaderText="Ho ho" runat="server"> <ContentTemplate> <asp:Panel runat="server" ID="pnlhohoh"> <asp:Label runat="server" ID="lblHOHO" Text="ho ho ho" /> <br /> <asp:TextBox ID="txtmmm" runat="server" ReadOnly="true" /> <br /> <br /> <br /> <br /> </asp:Panel> <asp:TabContainer runat="server" ID="tc123" Height="1100px" ActiveTabIndex="0"> <asp:TabPanel ID="tpabc" HeaderText="ABC" runat="server"> <ContentTemplate> </ContentTemplate> </asp:TabPanel> <asp:TabPanel ID="tp123" HeaderText="123" runat="server"> <ContentTemplate> <asp:ComboBox runat="server" ID="ddlBla" AutoCompleteMode="SuggestAppend" DropDownStyle="DropDown" DataTextField="0" Width="200px"> <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> </asp:ComboBox> </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </div> </form> <script type="text/javascript"> $get('<%=tpForecast.ClientID %>').style.visibility = "visible"; $get('<%=tpForecast.ClientID %>').style.display = "block"; $get('<%=tp123.ClientID %>').style.visibility = "visible"; $get('<%=tp123.ClientID %>').style.display = "block"; function pageLoad() { $get('<%=tpForecast.ClientID %>').style.visibility = "hidden"; $get('<%=tpForecast.ClientID %>').style.display = "none"; $get('<%=tp123.ClientID %>').style.visibility = "hidden"; $get('<%=tp123.ClientID %>').style.display = "none"; } </script> </body>Feedback to us
Develop and promote your apps in Windows Store
Ollza
Member
572 Points
304 Posts
Re: Combobox ldoesnt render correctly
Apr 19, 2012 09:31 AM|LINK
The tab cointiner is also in an accoirdion.. But when i add your java script all the comboboxes is hidden and when i change tab and back to my tab the comboboxes is there again but with the old fault. If i push a button the comboboxes looks ok after that...
Song-Tian - ...
All-Star
43699 Points
4304 Posts
Microsoft
Re: Combobox ldoesnt render correctly
Apr 19, 2012 09:33 AM|LINK
Hi,
I have tested the code. And it is running normal on my side. Please check again.
Feedback to us
Develop and promote your apps in Windows Store
Ollza
Member
572 Points
304 Posts
Re: Combobox ldoesnt render correctly
Apr 19, 2012 10:35 AM|LINK
I also use a accoirdion now and this makes it not work. Adding something to the script?
Code:
<form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" EnableScriptLocalization="true" EnablePageMethods="true"> <Scripts> <%--<asp:ScriptReference Path="scripts/BISCIT.js" ScriptMode="Release" />--%> </Scripts> </asp:ToolkitScriptManager> <asp:Accordion ID="accMain" runat="server" HeaderCssClass="accordionHeader" ContentCssClass="accordionContent" AutoSize="None" FadeTransitions="true" RequireOpenedPane="false" SelectedIndex="0"> <Panes> <asp:AccordionPane runat="server" ID="acpMain"> <Header> Bla <br /> </Header> <Content> <asp:Panel runat="server" ID="pnlInformation"> </asp:Panel> </Content> </asp:AccordionPane> <asp:AccordionPane runat="server" ID="acpForecast"> <Header> Input <br /> </Header> <Content> <asp:Panel runat="server" ID="pnlForecastMain"> <asp:Label runat="server" ID="lblForecasP" /> <br /> <asp:TextBox ID="txtForecastP" runat="server" ReadOnly="true" /> <br /> <br /> <br /> <br /> </asp:Panel> <asp:TabContainer runat="server" ID="tcForecastInput" Height="600px" ScrollBars="Auto" ActiveTabIndex="0"> <asp:TabPanel runat="server" ID="tpHead" HeaderText="Bla bla"> <ContentTemplate> <br /> <div id="headTop"> <asp:ComboBox runat="server" ID="ddlBla" AutoCompleteMode="SuggestAppend" DropDownStyle="DropDown" DataTextField="0" Width="200px"> <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> </asp:ComboBox> </div> <br /> <br /> <asp:Button ID="btnHeadSave" Text="Save" runat="server" /> </ContentTemplate> </asp:TabPanel> <asp:TabPanel runat="server" ID="tpOpexCostCenter" HeaderText="Opex CC"> <ContentTemplate> </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </Content> </asp:AccordionPane> <asp:AccordionPane runat="server" ID="acpAdmin"> <Header> Admin <br /> </Header> <Content> </Content> </asp:AccordionPane> </Panes> </asp:Accordion> </form>Ollza
Member
572 Points
304 Posts
Re: Combobox ldoesnt render correctly
Apr 19, 2012 12:35 PM|LINK
This doesnt work: doesnt find tje acpForecast.ClientId. Any idé?
$get('<%=acpForecast.ClientID %>').style.visibility = "visible"; $get('<%=acpForecast.ClientID %>').style.display = "block";