Link to home
Create AccountLog in
Avatar of No1Coder
No1CoderFlag for United States of America

asked on

Ajax Tab Control Render question

I am using the Ajax tab control in an asp.net application.  I am running some javascript on the page load event of the page to do fixup on grids on the tab.  My code depends on offsetWidth of some of the components on the page.  When the ajax tab is not visible, all the offset widths (for controls on that page) are = 0, which is not correct (which breaks my code).

I can fix by running my script when the tab changes, instead of page load.  I want to do this without a postback.  What event can I hook into on the client side?

Alternatively, is there a way to force the tab control to render non-visible tabs.
Avatar of Mrunal
Mrunal
Flag of India image

idea:

you can use jQuery / javascript which can control tabs for visibility or invisibility after page load and before html renders on browser.

use - Display = none property.
Avatar of No1Coder

ASKER

can you explain further?
ASKER CERTIFIED SOLUTION
Avatar of Mrunal
Mrunal
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I was able to fix this by putting code on the "OnClientPopulated" event.  I needed a post-render event.