Hello,I just started to work with NetAdvantage tools for asp.net. And I'm not very exerpienced in asp.net development yet.My first problem I have now is setting the height of a webTab control to 100%. The webTab control is placed in an usercontrol, that in turn is placed in a webSplitter in the aspx page.With:<ig:WebTab ID="tabWorkspace" runat="server" Height="100%" Width="100%"> <Tabs> <ig:ContentTabItem runat="server" Text="Start" ContentUrl="Start/start.htm" ScrollBars="Hidden" Height="100%"> </ig:ContentTabItem> </Tabs></ig:WebTab>I got exact what I want. The webTab uses the complete vertical space of the page.But after I have added an UpdatePanel:<asp:UpdatePanel ID="UpdatePanel1" runat="server" Height="100%"><ContentTemplate><ig:WebTab ID="tabWorkspace" runat="server" Height="100%" Width="100%"> <Tabs> <ig:ContentTabItem runat="server" Text="Start" ContentUrl="Start/start.htm" ScrollBars="Hidden" Height="100%"> </ig:ContentTabItem> </Tabs></ig:WebTab></ContentTemplate></asp:UpdatePanel>the 100% height got lost. The webTab is set to a fixed height, from which I don't know where it comes from. The content is larger than the webTab space and a vertical scrollbar appears.All attempts to set the height back to 100% failed. I have tried to set the UpdatePanel height to 100% and also tried to set the height to 100% in code behind. Pagel Load and Page Prerender events for usercontrol and main page.Can anybody give me a hint what can be wrong?best regardsAndreas
Hi
So I think I understand now. As my code works today, I simply add a usercontrol to a Template and it's visible. Inorder to resize the iframe, I must add the usercontrol first to an aspx page and then set that as my content url. Before I do this, is there a way to resize the template? Thanks.
Hi,
Unfortunately changing attributes of DOM elements used by WebTab are not supported. If application has side effects because of that, then it should not use that.If size of WebTab is permanent (fixed px width and height), then application may modify child elements like IFRAME and other children of content pane, but not get_element() or elements used for tab-label.
WebTab dynamically synchronizes and adjusts layout of its labels and content panes on various actions. If application will change layout attributes as well, then behavior can be unpredictable.
If you need to modify size/bounds of WebTab, then I can suggest to use its public methods:
setSize(width, height)orset_width(width), set_height(height).
Parameters should be valid % or px html units.
I was just debugging and I stand corrected, the javascript works for a split second but then is repainted to the smaller size again. Also, my tabs appear in the middlein IE8 and IE9 even when I set TabLocation to TopRight. Thanks.
Hello. Thanks for getting back to me. I tried your code but I got an error with iFrame and that's because the the element in the content Pane is a Div. So I used the following code, but the contentpane still won't resize to 450px:
function WebTab1_Initialize(oTab, oEvent) { debugger; var tabs = oTab.get_tabs(); var selTab = tabs[oTab.get_selectedIndex()]; //var iframe = selTab.get_iFrame(); var element = selTab.get_element(); if (oTab.get_selectedIndex() == 1 && element) { element.style.height = '450'; //selTab.Template.style.Height = '450px'; } }
But it doesn't work and after setting it to 450px, when I look at the value it just says "100%"
The reason why I need to resize the contentpane is that on the page we have two tabs
(BTW I inherited this code), 1 is visible and has a contentpane default height of 150px.
The 2nd is invisible and based off of a selection, we populate it's contentpane with a
usercontrol:
<ContentTabItem AccessKey="M" Key="main" EnableCloseButton="false" ScrollBars="Hidden"> <Template> <uc:ucPaygrid id="UcPaygrid1" runat="server"></uc:ucPaygrid> </Template> </ContentTabItem> <ContentTabItem AccessKey="a" Key="maint" Text="Maintenance" Hidden="true" MarginLeading="5px" EnableCloseButton="True" ScrollBars="Hidden"> <Template></Template> </ContentTabItem> and so on Initialize, I want to set the height of the second tabs contentpane to 450px
<ContentTabItem AccessKey="M" Key="main" EnableCloseButton="false" ScrollBars="Hidden"> <Template> <uc:ucPaygrid id="UcPaygrid1" runat="server"></uc:ucPaygrid> </Template> </ContentTabItem> <ContentTabItem AccessKey="a" Key="maint" Text="Maintenance" Hidden="true"
MarginLeading="5px" EnableCloseButton="True" ScrollBars="Hidden"> <Template></Template> </ContentTabItem>
and so on Initialize, I want to set the height of the second tabs contentpane to 450px
could you please post a link to the client side object models for the WebTab , I can find ie for the UltraWebTab but am having difficulty finding it for just WebTab. Thank you, sir.