We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

File explorer not rendering correct

Thread ID:

Created:

Updated:

Platform:

Replies:

127912 Dec 17,2016 08:01 PM UTC Dec 20,2016 05:32 AM UTC ASP.NET MVC 3
loading
Tags: FileExplorer
ivo ver eecke
Asked On December 17, 2016 08:01 PM UTC

Hi,

I am using a fileexplorer in a modal popup (bootstrap) and I can't seem to get it to render correct.
The navigation pane is always very narrow.

Below is the code used in the view.


 @(Html.EJ().FileExplorer("fileExplorer")
            .Path("~/resources/")
            .AjaxAction(@Url.Content("FileActionDefault"))
            .ToolsList(toolsList)
            .AjaxAction("/File/FileActionDefault")
            .Layout(LayoutType.LargeIcons)
            .Tools(tool =>
                tool.CustomTool(custom =>
                custom.Name("Gebruiken")
                .Tooltip("Gebruiken")
                .Css("e-fileExplorer-toolbar-icon Help")
                .Action("dialogOpen").Add()
                ))
            .AllowMultiSelection(false)
            .Layout(LayoutType.LargeIcons)
            .Width("100%")
        )

Any help would be greatly appreciated.

Best regards
Ivo

Balamurugan P [Syncfusion]
Replied On December 19, 2016 12:41 PM UTC

Hi Ivo, 
Thanks for using Syncfusion products. 
We have analyzed the reported issue with our sample;  The reported issue (“FileExplorer has not rendered properly in a model popup”) occurs, while rendering FileExplorer control in the hidden state (display: none). Normally, you can’t get the height and width of an element in hidden state. To resolve this problem, you have to call the “adjustSize()” method of “FileExplorer” control after dialog has been opened. Please refer the below code block to resolve this problem. 
Code example [CSHTML]: 
@{Html.EJ().Dialog("modelDialog").Title("FileExplorer").IsResponsive(true).Containment(".control").ContentTemplate(@<div> 
            @(Html.EJ().FileExplorer("fileExplorer") 
            .Path("~/resources/") 
            .AjaxAction(@Url.Content("FileActionDefault")) 
            .ToolsList(toolsList) 
             .AjaxAction("/FileExplorer/FileActionDefault") 
            .Layout(LayoutType.LargeIcons) 
            .Tools(tool => 
                tool.CustomTool(custom => 
                custom.Name("Gebruiken") 
                .Tooltip("Gebruiken") 
                .Css("e-fileExplorer-toolbar-icon Help") 
                .Action("dialogOpen").Add() 
                )) 
            .AllowMultiSelection(false) 
            .Layout(LayoutType.LargeIcons) 
            .Width("100%") 
            ) 
        </div>).EnableModal(true).EnableResize(false).ShowOnInit(false).Width(900).ClientSideEvents(evt => evt.Open("adjustSize").Resize("adjustSize").Close("onDialogClose")).IsResponsive(true).Render();} 
 
<script type="text/javascript"> 
function adjustSize(args) { 
           $("#fileExplorer").ejFileExplorer("adjustSize");       
    } 
</script> 
 
We have prepared a sample based on your requirement and you can find the sample under the following location:  
 
Still if you have this problem, please get back to us with some additional information to reproduce this issue.  This would be helpful for us to serve you. 
Regards, 
Balamurugan 


ivo ver eecke
Replied On December 19, 2016 05:46 PM UTC

Thanks, this works very well!!

Balamurugan P [Syncfusion]
Replied On December 20, 2016 05:32 AM UTC

Hi Ivo,   
Most welcome. 

 
Regards, 
Balamurugan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;