We have one WebTab and inside one tab we have a child page, which has a asp dropdownlist and a table. Now on change of the dropdown values we are hiding/showing one of the table rows on client side in a external js file. Now the issue is that when the tab loads with the table row opened and then we hide the row on change of the drop down, after that we are getting a huge white space inside the tab. This is happening since the webtab height remains the same as it was onload, but the content height inside the tab has decreased, due to hiding the table row.Could someone please help us and let us know, how we can set the webtab height based on the content height inside the WebTab using javascript/jQuery?
Hello,
Thank you for using our forum!
After a little investigation, I find a way to accomplish your requirement with a simple css only, without JavaScript. You need to set Height="" to your WebTab control and also use css to force auto-sizing when you hide rows (height: auto !important;). In your ig_res folder find ig_webtab.css and change the .igtab_THContentHolder like I show you below.
Code snippet:
I have create you a sample to accomplish this task. If you have any further questions regarding this do not hesitate to contact me!
Hi Zdravko,First of all, thanks so much for your response.
Secondly, I tested the your demo and I found that its also working fine on my end too.But then I went further and tested more and replaced the static content inside the ContentTabItem and replaced it with a simple aspx page by setting the ContentUrlAspx:-
<ig:webtab id="WebTab1" runat="server" width="300px" height=""> <Tabs> <ig:ContentTabItem runat="server" Text="Tab 1"> </ig:ContentTabItem> <ig:ContentTabItem runat="server" Text="Tab 2"> </ig:ContentTabItem> </Tabs> </ig:webtab>
Aspx.cs:-
WebTab1.Tabs[0].ContentUrl = "WebForm.aspx";
But this time Web tab height remained the same and it was way to small on page load only. The webtab height should have the height of the content url WebForm.aspx inside the first tab, right? Could you please test it once at your end too?Looking forward to your response!