Scheduler Clientside Resizing

9 posts, 1 answers
  1. Oziem
    Oziem avatar
    17 posts
    Member since:
    Nov 2006

    Posted 13 Nov 2008 Link to this post

    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
  2. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 13 Nov 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Oziem
    Oziem avatar
    17 posts
    Member since:
    Nov 2006

    Posted 13 Nov 2008 Link to this post

    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
  5. Oziem
    Oziem avatar
    17 posts
    Member since:
    Nov 2006

    Posted 13 Nov 2008 Link to this post

    Actually ignore that, it does resize the height.  Sorry, I made a mistake in my AJAX callback
  6. Jeff Nafe
    Jeff Nafe avatar
    46 posts
    Member since:
    Sep 2007

    Posted 31 Jul 2009 Link to this post

    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?
  7. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 05 Aug 2009 Link to this post

    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.
  8. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 27 Aug 2009 Link to this post




    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.
  9. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 28 Aug 2009 Link to this post

    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.
  10. Jeff Nafe
    Jeff Nafe avatar
    46 posts
    Member since:
    Sep 2007

    Posted 28 Aug 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017