This is a migrated thread and some comments may be shown as answers.

Scheduler Clientside Resizing

8 Answers 196 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Oziem
Top achievements
Rank 2
Oziem asked on 13 Nov 2008, 12:27 PM
Hi,

We are using a scheduler inside a container and used to be able to just resize the container (with the scheduler width as 100%) and use Telerik.Web.UI.RadScheduler._adjustHeight() to adjust the size of the scheduler. 

Upgrading from Q1 2008 to Q3 2008 this appears not to be available now.  How do I adjust the width and height of the scheduler clientside?

Dave

8 Answers, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 13 Nov 2008, 01:00 PM
Hi Oziem,

You can substitute the call to _adjustHeight() with a call to repaint(). The repaint method is part of the public API and as such, it will not be changed without prior notice.

One difference is that repaint() is an instance method, so you will need to obtain a reference to the RadScheduler instance first. For example:

Sys.Application.add_load (function() 
    $find("RadScheduler1").repaint(); 
}); 
 

Please, excuse us for the inconvenience.

Greetings,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Oziem
Top achievements
Rank 2
answered on 13 Nov 2008, 02:05 PM
Thanks.

That seems to work in resizing the width of the scheduler but it does not resize the height.  Is there anything that I may be doing wrong?  Could the fact that its in a AJAX Panel be a problem?  I have set the AJAX panel height/width to be 100%.

<Panel>
    <AJAX Panel>
        <Scheduler>
    </AJAX Panel>
</Panel>


ps. repaint() isn't listed in the Client-Side help section
0
Oziem
Top achievements
Rank 2
answered on 13 Nov 2008, 03:43 PM
Actually ignore that, it does resize the height.  Sorry, I made a mistake in my AJAX callback
0
Jeff Nafe
Top achievements
Rank 1
answered on 31 Jul 2009, 06:44 PM
We just realized that our code is no longer resizing our Scheduler properly on the client side. Previously, the following line of code within Javascript did it (schedulerDiv is the scheduler control):

        schedulerDiv.style.height = viewPortHeight - topHeight - rqPaneHeight + "px";

It seems like as of using the Q1 2009 dll, this no longer works. If I step through, the height properties are probably set, this isn't reflected on the page. This Scheduler lives within a div and if I resize that container div, this change is seen immediately within the page, the Scheduler just doesn't seem to redraw itself for some reason. From searching the forums, it looks like the repaint() method is what I need, but that no longer seems to be available.

Any suggestions?
0
T. Tsonev
Telerik team
answered on 05 Aug 2009, 03:39 PM
Hello,

The repaint() function is still available in the Q1 version. One difference is that it's now called each time the window is resized. This might be conflicting with your code, but it's hard to say.

You should check that the height of the element is indeed set correctly by using the IE Developer Toolbar/Tools.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Doug Beard
Top achievements
Rank 2
answered on 27 Aug 2009, 07:51 PM



I've posted in all the other threads concerning this, but received no answer so far.  This one is more current, so I'll try here.

I've confirmed I'm aquiring a reference to the scheduler clientside, however; when I attempt to use the repaint() method mentioned here and elsewhere I get a clientside error that the object does not support the method.

I could use some help on this, because when the height of the scheduler is set using clientside, it does not retain the height once it has entered and subsequently exited the edit/insert form.
0
Doug Beard
Top achievements
Rank 2
answered on 28 Aug 2009, 01:11 PM
Bueller? Anyone, Anyone?

Still no answer on this issue, its becoming quite critical that an explanation is had as to why repaint() is not working and why the scheduler chooses to resize itself after a call to the edit/insert forms.
0
Jeff Nafe
Top achievements
Rank 1
answered on 28 Aug 2009, 01:32 PM
Doug, I was the original one to ask about this. I found the claim that repaint() still exists to be false also. But, I later figured out that it wasn't needed, and the resize really did take place without calling that. I had other code that was blocking the resize. If you simplify the case, maybe it will work.
Tags
Scheduler
Asked by
Oziem
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Oziem
Top achievements
Rank 2
Jeff Nafe
Top achievements
Rank 1
Doug Beard
Top achievements
Rank 2
Share this question
or