scheduler refresh after rowHeight modified by JS

2 posts, 0 answers
  1. MASSEMIN
    MASSEMIN avatar
    8 posts
    Member since:
    Jul 2012

    Posted 23 Jul 2012 Link to this post

    Hi,

    I wrote this code :

    function SplitterLoaded(splitter, arg) {
        var scheduler = $find("<%= RadScheduler1.ClientID %>");
        var hauteur = window.innerHeight - 71;
        var slots = (((scheduler.get_dayViewSettings().dayEndTime / 1000) / 60) - ((scheduler.get_dayViewSettings().dayStartTime / 1000) / 60)) / 15
        scheduler.set_rowHeight("" + Math.round(hauteur / slots) + "px");
        var pane = splitter.getPaneById('RadPane1');
        var height = pane.getContentElement().scrollHeight;
        splitter.set_height(splitter.get_height() - pane.get_height() + height);
        pane.set_height(height);
    }

    but when I call 

    scheduler.set_rowHeight("" + Math.round(hauteur / slots) + "px");

    the timeslot doesn't resize dynamically.

    how can I refresh the scheduler ?

    thanks.
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 25 Jul 2012 Link to this post

    Hi MASSEMIN,

    Try the following:
    function SplitterLoaded(splitter, arg) {
        var scheduler = $find("<%= RadScheduler1.ClientID %>");
        var hauteur = window.innerHeight - 71;
        var slots = (((scheduler.get_dayViewSettings().dayEndTime / 1000) / 60) - ((scheduler.get_dayViewSettings().dayStartTime / 1000) / 60)) / 15
        $telerik.$(".rsContentTable tr").css("height", "" + Math.round(hauteur / slots) + "px")
        //...
    }
     
    I hope this will help.

    Regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top