Set HeightOffset of RadSplitter from Javascript

4 posts, 0 answers
  1. Robin
    Robin avatar
    30 posts
    Member since:
    Jun 2012

    Posted 07 May 2015 Link to this post

    Dear Telerik-Team,

    is there a way to change the heightOffset-value of a RadSplitter from Javascript?

    I've tried getting the Client-Side object and using set_heightOffset(x), but that didn't seem to work.

    Thanks in advance,

    Robin

  2. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 07 May 2015 Link to this post

    Hi Robin,

    You will need to repaint the Splitter so it will recalculate its size extracting the set offset height:
    var splitter = $find("RadSplitter1");
    splitter.set_heightOffset(50);
    splitter.repaint();

    I hope this helps.

    Regards,
    Vessy
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robin
    Robin avatar
    30 posts
    Member since:
    Jun 2012

    Posted 13 May 2015 in reply to Vessy Link to this post

    Hi Vessy, 

    thank you for the fast reply.

    I'm trying to set the height-offset of a RadSplitter when the RadRibbonBar is minimized and have tried the code that you suggested, but unfortunately, it doesn't appear to work, since the offset of the splitter doesn't change. If I try to get an alert before and after, then I only get the first alert, not the second.

    Thanks in advance,

    Robin

    alert("Minimized");
     
    var splitter = find("<%=MainRadSplitter%>");
    splitter.set_heightOffset(0);
    splitter.repaint();
                     
    alert("splitter repainted");

  5. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 18 May 2015 Link to this post

    Hi Robin,

    I am afraid I cannot be of much help as with the current information I can only guess what is the exact configuration in which the issue occurs. I tested the scenario with a sample page setting/removing the height offset when a div element is shown/hidden, but the Splitter behaves as expected on my side. I am attaching my test page to this reply so you can examine it on your side and compare its configuration with the one used by you. I hope this helps.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top