This is a migrated thread and some comments may be shown as answers.
Resizing control when containing element is invisible
6 Answers 53 Views
This is a migrated thread and some comments may be shown as answers.
Sponge Bob Square Pants
Top achievements
Rank 1
Sponge Bob Square Pants asked on 17 Dec 2009, 05:42 PM
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

6 Answers, 1 is accepted

Sort by
0
Peter Ladka
Top achievements
Rank 1
answered on 17 Dec 2009, 08:57 PM
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.
0
Sponge Bob Square Pants
Top achievements
Rank 1
answered on 18 Dec 2009, 09:03 AM
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
0
Sponge Bob Square Pants
Top achievements
Rank 1
answered on 18 Dec 2009, 09:40 AM
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?
0
Fiko
Telerik team
answered on 19 Dec 2009, 12:36 PM
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.
0
Sponge Bob Square Pants
Top achievements
Rank 1
answered on 21 Dec 2009, 11:11 AM
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.
0
Accepted
Fiko
Telerik team
answered on 21 Dec 2009, 01:01 PM
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.
Asked by
Sponge Bob Square Pants
Top achievements
Rank 1
Answers by
Peter Ladka
Top achievements
Rank 1
Sponge Bob Square Pants
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or