在DevExpress FileManager控件中,我能够通过客户端检索当前选定的路径,并在警报框中看到它,但是无法将其更改为另一路径。我尝试了许多路径组合,包括使用GetCurrentFolderPath()检索的路径,但无济于事。我在控件后面添加了一个按钮,以说明问题。
@model string
@Html.DevExpress().FileManager(settings => {
settings.Name = "FileManagerAbout";
settings.CallbackRouteValues = new { Controller = "Home", Action = "FileManagerAboutPartial" };
settings.DownloadRouteValues = new { Controller = "Home", Action = "FileManagerAboutPartialDownload" };
settings.SettingsEditing.AllowDownload = true;
settings.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
settings.SettingsEditing.AllowCreate = true;
settings.SettingsEditing.AllowRename = true;
settings.SettingsEditing.AllowMove = true;
settings.SettingsEditing.AllowDelete = true;
settings.SettingsUpload.Enabled = true;
settings.SettingsUpload.UseAdvancedUploadMode = true;
settings.SettingsUpload.AdvancedModeSettings.EnableMultiSelect = true;
settings.SettingsFileList.View = DevExpress.Web.FileListView.Thumbnails;
}).BindToFolder(Model).GetHtml()
@Html.DevExpress().Button(settings => {
settings.Name = "ButtonXXX";
settings.UseSubmitBehavior = false;
settings.ClientEnabled = true;
settings.ClientSideEvents.Click = "function(s,e) { alert(FileManagerAbout.GetCurrentFolderPath()); FileManagerAbout.SetCurrentFolderPath('RPWebReservation\\Client'); }";
}).GetHtml()