Current filter:
                                You should refresh the page.
                                  • Hi DevExpress Support,

                                    i want to use FileManager in DetailsViewMode.

                                    The rootfolder is shown but when I select a subfolder this error is shown in the browser console :

                                    Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
                                        at ret.GetColumnSizes (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75659)
                                        at ret.ReadSizes (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75441)
                                        at ret.ReadSizes (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75706)
                                        at ret.CalculateAdaptivityInternal (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75430)
                                        at ret.CalculateAdaptivityInternal (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75576)
                                        at ret.CalculateAdaptivityCore (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75421)
                                        at ret.CalculateAdaptivity (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75383)
                                        at ret.CalculateAdaptivity (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:75411)
                                        at ret.CalculateAdaptivity (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:74242)
                                        at ret.CalculateAdaptivity (DXR.axd?r=1_11,1_63,1_12,1_13,1_14,1_15,1_16,1_20,1_65,1_48,1_17,1_9,17_0,17_7,1_27,1_39,1_31,17_35,1_23,1_55,17_34,1_41,1_54,1_53,17_33,1_179,1_180,1_24,1_33,1_46,1_209,1_207,1_236,1_47,1_52,17_6,1_51,17_14,1_21,1_22,1_40,1_34,1_19,1_220,1_221,1_208,1_214,1_212,1_215,1_216,1_213,1_217,1_210,1_218,1_219,1_223,1_232,1_234,1_235,1_222,1_227,1_228,1_229,1_211,1_224,1_225,1_226,1_230,1_231,1_233,17_48,17_49,17_2,1_59,1_57,17_38,1_56,17_39,1_58,17_40,17_41,1_60,17_3,1_49,17_8,17_9,1_35,17_10,1_62,17_11,1_50,1_38,17_43,1_43,17_12,17_13,1_66,1_178,17_23,1_186,1_246,17_1-NiTEj:74736)

                                • Anthony (DevExpress Support) 10.28.2019

                                  Hello,

                                  It looks like your callback action method doesn't return the correct partial view.
                                  Would you please share the related view and controller files?

                                • Customer105371 10.28.2019

                                  Hi Anthony,

                                  my first problem in the screenshot is solved by myself, but the second error (jqery) is still the problem...

                                  Perhaps i forgot something to initialize? The files in the rootfolder shown perfect but if i browse some subfolder, the error is shown in log and the filemanager don't work anymore... in iconmode it works fine.

                                  This is my partial:

                                  [HTML]
                                  @using Example.Web.ExtensionClasses @model Example.Web.Models.Explorer.ExplorerViewModel @Html.DevExpress().FileManager( settings => { settings.Name = Model.ControlBaseId; settings.CallbackRouteValues = new { Controller = "Explorer", Action = "FeaturesPartial" }; settings.DownloadRouteValues = new { Controller = "Explorer", Action = "DownloadFiles" }; settings.Settings.InitialFolder = Model.PreSelectedFolder; settings.Settings.EnableMultiSelect = Model.EnableMultiSelect; settings.SettingsEditing.Assign(Model.ExplorerEditing); settings.SettingsToolbar.Assign(Model.ExplorerToolbar); settings.SettingsFolders.Assign(Model.ExplorerFolderSettings); settings.SettingsFileList.Assign(Model.ExplorerFileSettings); settings.SettingsBreadcrumbs.Assign(Model.ExplorerBreadcrumbs); settings.SettingsUpload.Assign(Model.ExplorerUploadSettings); settings.SettingsUpload.AdvancedModeSettings.EnableMultiSelect = Model.EnableMultiUpload; //settings.SettingsFileList.View = FileListView.Details; settings.SettingsPermissions.Role = Model.AccessRole; foreach (var item in Model.AccessRules) { settings.SettingsPermissions.AccessRules.Add(item); } settings.SettingsAdaptivity.Enabled = true; settings.SettingsFileList.DetailsViewSettings.AllowColumnDragDrop = false; settings.SettingsFileList.DetailsViewSettings.AllowColumnResize = false; settings.SettingsFileList.DetailsViewSettings.AllowColumnSort = false; settings.SettingsFileList.DetailsViewSettings.ShowHeaderFilterButton = false; } ).BindToFolder(Model.RootFolder).GetHtml()

                                  This is my main view:

                                  [HTML]
                                  @model Example.Web.Models.Explorer.ExplorerViewModel @if (!String.IsNullOrWhiteSpace(Model.ControlBaseId)) { using (Html.BeginForm()) { Html.RenderPartial("~/Views/Partials/Explorer/ExplorerPartial.cshtml",Model); } } else { <text>Unable to access filesystem.</text> }

                                  And this is my controller for the patial, the main view is called from different controllers...

                                  [C#]
                                  using DevExpress.Web; using DevExpress.Web.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Example.Web.Models.Explorer; namespace Example.Web.Controllers { public class ExplorerController: ExampleBaseController { [ValidateInput(false)] public ActionResult FeaturesPartial() { var model = new ExplorerViewModel(CurrentUserRole); var explorerItem = GetExplorerItem(Session.SessionID); model.ControlBaseId = explorerItem.ControlBaseID; model.RootFolder = explorerItem.RootFolder; return PartialView("~/Views/Partials/Explorer/ExplorerPartial.cshtml", model); } public FileStreamResult DownloadFiles() { var explorerItem = GetExplorerItem(Session.SessionID); return FileManagerExtension.DownloadFiles(CreateFileManagerDownloadSettings(), (string)explorerItem.RootFolder); } public DevExpress.Web.Mvc.FileManagerSettings CreateFileManagerDownloadSettings() { var config = new ExplorerViewModel(CurrentUserRole); return CreateFileManagerDownloadSettingsCore(config.ExplorerEditing); } public DevExpress.Web.Mvc.FileManagerSettings CreateFileManagerGeneralDownloadSettings() { FileManagerSettingsEditing editingSettings = CreateFileManagerEditingSettings(); return CreateFileManagerDownloadSettingsCore(editingSettings); } public DevExpress.Web.Mvc.FileManagerSettings CreateFileManagerDownloadSettingsCore(DevExpress.Web.FileManagerSettingsEditing editingSettings) { var item = GetExplorerItem(Session.SessionID); var settings = new DevExpress.Web.Mvc.FileManagerSettings(); settings.SettingsEditing.Assign(editingSettings); settings.Name = item.ControlBaseID; return settings; } public FileManagerSettingsEditing CreateFileManagerEditingSettings() { var model = new ExplorerViewModel(CurrentUserRole); return model.ExplorerEditing; } public static List<SelectListItem> GetFileListViewModes() { return new List<SelectListItem>() { new SelectListItem() { Text = FileListView.Thumbnails.ToString(), Value = FileListView.Thumbnails.ToString() }, new SelectListItem() { Text = FileListView.Details.ToString(), Value = FileListView.Details.ToString(), Selected = true } }; } public static void ValidateSiteEdit(FileManagerActionEventArgsBase e) { e.Cancel = false; e.ErrorText = "Fehler beim Upload"; } } }

                                  and this is my model

                                  [C#]
                                  using System; using System.Collections.Generic; using System.Linq; using System.Web; using DevExpress.Web; using Example.Domain.Security; namespace Example.Web.Models.Explorer { public class ExplorerViewModel { public string PreSelectedFolder { get; set; } public string RootFolder { get; set; } public string ControlBaseId { get; set; } public bool EnableMultiSelect { get; set; } public bool EnableMultiUpload { get; set; } public string AccessRole { get; set; } public List<FileManagerFolderAccessRule> AccessRules { get; set; } public FileManagerSettings ExplorerSettings { get; set; } public FileManagerSettingsEditing ExplorerEditing { get; set; } public FileManagerSettingsToolbar ExplorerToolbar { get; set; } public FileManagerSettingsBreadcrumbs ExplorerBreadcrumbs { get; set; } public FileManagerSettingsFolders ExplorerFolderSettings { get; set; } public FileManagerSettingsFileList ExplorerFileSettings { get; set; } public FileManagerSettingsUpload ExplorerUploadSettings { get; set; } public ExplorerViewModel() { PreSelectedFolder = string.Empty; AccessRole = string.Empty; AccessRules = new List<FileManagerFolderAccessRule>(); } public ExplorerViewModel(ApplicationRole userRole) { PreSelectedFolder = string.Empty; AccessRole = string.Empty; AccessRules = new List<FileManagerFolderAccessRule>(); ExplorerEditing = new FileManagerSettingsEditing(null) { AllowCopy = userRole.HasChangePermission, AllowCreate = userRole.HasChangePermission, AllowDelete = userRole.HasFullPermission, AllowDownload = true, AllowMove = userRole.HasChangePermission, AllowRename = userRole.HasChangePermission }; ExplorerUploadSettings = new FileManagerSettingsUpload(null) { AutoStartUpload = true, UseAdvancedUploadMode = true }; ExplorerFileSettings = new FileManagerSettingsFileList(null) { }; ExplorerFolderSettings = new FileManagerSettingsFolders(null); } } }
                                • Lanette (DevExpress Support) 10.29.2019

                                  Hello,

                                  Thank you for your clarification.
                                  I've thoroughly checked your code snippets but at the moment I don't see any problem that may cause the error. As I see from the error's text, it seems to relate to adaptivity that is enabled in your FileManager. I wasn't able to reproduce this error in our Details View demo where the detail view is used with the enabled adaptivity. See the attached video.

                                  I suggest you set FileManager's Width setting to 100% as shown in this demo and check if the error still occurs.
                                  Would you please send us a simple runnable project where we can reproduce the issue in action? This will help us investigate its exact cause and provide you with further recommendations.

                                • Customer105371 11.06.2019

                                  Dear Lanette,

                                  I created a sample project where you can see the error. The rootfolder is shown as well but if i click to a subfolder, the error occurs and the subfolder is not shown.

                                  Please add all DevExpress-dll's and xml's, because the zip is with this files to large. I deleted this files in bin-folder, all version 19.1

                                  Thanks,
                                  Christoph

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                I researched your sample project and found that the problem may occur because you're passing different models to the FileManager partial view on the first page load in the Home controller's Index action and on callbacks in the FeaturesPartial action.
                                To resolve the issue, I suggest you pass the full model which you configure in the Home controller's Index action to the FileManager partial view on callbacks (in the Explorer controller's FeaturesPartial action). See the attached video.
                                Let us know if this helps.

                                • Customer105371 11.08.2019

                                  Dear Lanette,

                                  thanks for help, when i pass the whole model to subview, it works. But now I have a view problem with the treeview with subfolders as shown in my screenshot ... Perhaps this is another problem with my model?

                                  Thanks,
                                  Christoph

                                • Lanette (DevExpress Support) 11.08.2019

                                  Hello,

                                  I've checked your screencast but at the moment, it's not clear why this effect occurs. It seems to be related to your "temp" folder's nested folders structure. I recommend you ensure that you pass the same model with the same folders to the FileManager's partial view. If this doesn't help, please send us your modified sample project with the "temp" folder's structure.