Resizing control when containing element is invisible

7 posts, 1 answers
  1. Sponge Bob Square Pants
    Sponge Bob Square Pants avatar
    5 posts
    Member since:
    Sep 2009

    Posted 17 Dec 2009 Link to this post

    I have an issue where I am using the RadFileExplorer in a dialog on a web page. When the control is added to the page and it is always visible, the control width resizes according to its containing div as expected. However if the control is loaded and subsequently resizes accordingly, then it's containing div is made invisible, the window is then resized and the the div is made visible again the RadFileExplorer's width remains the same as when it was initially loaded.

    Is there anyway I can work around this issue so that the control can be resized when its containing div is made visible with an api call for example, or something else?

    I have replicated this issue by creating a div and placing the RadFileExplorer control within the div, then wiring up an anchor element to to toggle the display (using jquery), and then resizing the window.

    Any help would be greatly appreciated.

    Many Thanks
  2. Peter Ladka
    Peter Ladka avatar
    1 posts
    Member since:
    Nov 2006

    Posted 17 Dec 2009 Link to this post

    not sure if this post will help you, but it sounds similiar. I'm currently seeing if it'll fix my explorer.show() & explorer.hide() issues with files not being visible.

    http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/problem-with-display-none.aspx

    Edit: worked.
  3. Sponge Bob Square Pants
    Sponge Bob Square Pants avatar
    5 posts
    Member since:
    Sep 2009

    Posted 18 Dec 2009 Link to this post

    Thanks for that Peter, it looks as though using a fixed width is the recommended approach, however, as my RadFileExplorer is in a dialog that opens depending on the current window size that's not an option unfortunately. But there are a couple of things to try there that might work so I'll have a crack and report any findings back.

    Cheers
  4. Sponge Bob Square Pants
    Sponge Bob Square Pants avatar
    5 posts
    Member since:
    Sep 2009

    Posted 18 Dec 2009 Link to this post

    Ok, I've tried the repaint method to no avail, however I noticed that if the RadFileExplorer is visible and I then change the window size, the RadFileExplorer control is automatically resized. Therefore I'm assuming that some function or method is getting called on the control to resize it. Is it possible for me to call this 'Resize' method (I've not noticed it in the api documentation) that the RadFileExplorer calls when a window is resized?
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 19 Dec 2009 Link to this post

    Hi Sam,

    The RadFileExplorer control does not support resizing and you cannot change its size on the client after the control is loaded.

    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Sponge Bob Square Pants
    Sponge Bob Square Pants avatar
    5 posts
    Member since:
    Sep 2009

    Posted 21 Dec 2009 Link to this post

    Ah ok. I'm thinking then that the fact the control resizes when its containing div (which is set to a percentage of the page width) is resized as a result of the window.onresize event is more luck than supported functionality?

    I promise i'm not being sarcastic, just trying to figure out the best way around this.

    Many thanks.
  7. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 21 Dec 2009 Link to this post

    Hi Sponge,

    It may look as working normal, but please note that using relative values with RadFileExplorer control may lead to some unpredictable behavior. That is why I strongly recommend you to use fixed values (pixel) instead.

    Sincerely yours,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top