2012年3月28日水曜日

Resizing the Ajax ResizableControlExtender durning the OnLoad event

I'm having a problem with the Ajax ResizableControlExtender.

The control is around an asp panel, which is around a gridview. The gridview is really wide, and I need the headers to stay at the top when scrolling down. That's working just fine.

I have a body onresize javascript event that resizes the ResizableControlExtender to fit better on the screen whenever the screen is resized.

What I need to do is have the resize event fire on the "OnLoad" event.

But at that time the ResizableControlExtender has not been initialized (or so I suppose) and is undefined at that time.

Is there a way to resize the ResizableControlExtender to the current window size in the page load event?

Thanks.

Chuck Snyder

Hi Chuck,

Based on my understanding, the pageLoad method is fired after all extenders on the page have been initialized. But if it doesn't work with you, please try to use window.setTimeout method to invoke the resize method in pageLoad, so that it will be called asynchronized at later.

For instance:

function pageLoad() { window.setTimeout(resize, 1000); }

0 件のコメント:

コメントを投稿