|
<SfFileManager ID="filemanager" @ref="file" View="Syncfusion.Blazor.FileManager.ViewType.Details" Path="@path" SelectedItems="@SelectedItems">
<FileManagerNavigationPaneSettings Visible="false"></FileManagerNavigationPaneSettings>
<FileManagerContextMenuSettings Visible="false"></FileManagerContextMenuSettings>
<FileManagerToolbarSettings Visible="false"></FileManagerToolbarSettings>
<FileManagerEvents OnFileOpen="fileOpen"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/Default/FileOperations"
UploadUrl="/api/Default/Upload"
DownloadUrl="/api/Default/Download"
GetImageUrl="/api/Default/GetImage">
</FileManagerAjaxSettings>
</SfFileManager> |
|
<div id='container' @ref="container" class="fileupload">
<SfUploader @ref="upload" ID="UploadFiles" Files="@files">
</SfUploader>
<SfButton ID="openBtn" OnClick="click" Content="File Browser"></SfButton>
</div>
<div id='target' class="control-section">
<SfDialog @ref="dialog" ID="dialog" Height="75%" Width="850px" Target="#target" Visible="false" ShowCloseIcon="true" Header="Select a file">
<DialogEvents Opened="open" ></DialogEvents>
<DialogTemplates>
<Content>
<SfFileManager ID="filemanager" @ref="file" View="Syncfusion.Blazor.FileManager.ViewType.Details" Path="@path" SelectedItems="@SelectedItems">
<FileManagerNavigationPaneSettings Visible="false"></FileManagerNavigationPaneSettings>
<FileManagerContextMenuSettings Visible="false"></FileManagerContextMenuSettings>
<FileManagerToolbarSettings Visible="false"></FileManagerToolbarSettings>
<FileManagerEvents OnFileOpen="fileOpen"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/Default/FileOperations"
UploadUrl="/api/Default/Upload"
DownloadUrl="/api/Default/Download"
GetImageUrl="/api/Default/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
</Content>
</DialogTemplates>
</SfDialog>
</div>
public void click()
{
this.dialog.Show();
path = "/";
}
public void open(Object args)
{
this.file.Refresh();
}
public void fileOpen(Syncfusion.Blazor.FileManager.FileOpenEventArgs args)
{
string dataString = JsonConvert.SerializeObject(args.FileDetails);
Dictionary<string, dynamic> fileDetails = JsonConvert.DeserializeObject<Dictionary<string, dynamic>>(dataString);
if (fileDetails["isFile"])
{
args.Cancel = true;
files = new List<UploaderUploadedFiles> { new UploaderUploadedFiles() { Name = fileDetails["name"], Type = fileDetails["type"], Size = fileDetails["size"] } };
this.dialog.Hide();
}
} |
|
<SfFileManager ID="filemanager" @ref="file" View="Syncfusion.Blazor.FileManager.ViewType.Details" Path="@path" SelectedItems="@SelectedItems">
<FileManagerEvents OnFileOpen="fileOpen" FileSelection="fileSelect"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/Default/FileOperations"
UploadUrl="/api/Default/Upload"
DownloadUrl="/api/Default/Download"
GetImageUrl="/api/Default/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
public void fileSelect(Syncfusion.Blazor.FileManager.FileSelectionEventArgs args)
{
string dataString1 = JsonConvert.SerializeObject(args.FileDetails);
Dictionary<string, dynamic> fileDetails1 = JsonConvert.DeserializeObject<Dictionary<string, dynamic>>(dataString1);
if (fileDetails1["isFile"])
{
string slectedFile = (this.file.AjaxSettings.Url + fileDetails1["filterPath"].Replace("\\", "/") + fileDetails1["name"]);
}
} |
|
<GridColumn Field="Imagesrc" HeaderText="Customer Name" Width="200">
...
<EditTemplate>
<SfFileManager ID="filemanager" @ref="file" ...>
<FileManagerEvents OnFileOpen="fileOpen" FileSelection="fileSelect"></FileManagerEvents>
...
</SfFileManager>
</EditTemplate>
</GridColumn>
|
|
@using Syncfusion.Blazor.FileManager;
<SfFileManager @ref="file" SelectedItems="@SelectedItems" Path="@path">
<FileManagerAjaxSettings Url="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
</FileManagerAjaxSettings>
</SfFileManager>
@code{
SfFileManager file;
public string path { get; set; } = "/Pictures/Food";
public string[] SelectedItems { get; set; } = new string[] { "Nuggets.png" };
} |
|
<style>
#filemanager_breadcrumbbar .e-addressbar-ul {
display: none;
}
</style> |
|
<style>
/* Change the file manager image size*/
.e-filemanager .e-large-icons .e-list-img {
height: 140px;
max-height: inherit;
}
/* Change the icon size of FileManager component*/
.e-filemanager .e-large-icons .e-list-icon {
height: 140px;
width: 135px;
margin: 0 10px !important;
}
/* change the image list item size */
.e-filemanager .e-large-icons .e-list-item {
height: 174px;
width: 164px;
}
</style> |
Interesting!
That setup sounds similar to how I handle interface customization for certain applications. In my case, I had to simplify the layout for a restaurant project that displayed the white limozeen menu on a local system without extra navigation panels or toolbars. The goal was to create a clean, focused window that only showed essential content, much like your idea of a file picker with minimal distractions.
Hi
Sam,
With the shared details, we understand that you want to remove the navigation
pane and toolbars in the Blazor FileManager component. To meet your need, we
suggest setting the Visible property NavigationPaneSettings
and ToolbarSettings
in the Syncfusion FileManager component. Here, we have included the sample and
screenshots for your reference.
Sample : Attached as a zip file.
Provider : https://github.com/SyncfusionExamples/ej2-aspcore-file-provider
Output screenshot:
|
|
Please refer to the details shared on your end. If we have misunderstood your needs or if you have any concerns regarding the information provided, please give us a clear and description of your requirements, along with a visual representation of your expectations. This will help us assist you more effectively in finding a solution.
Your input is invaluable in helping us understand your issue and in providing a timely resolution.
Leo Lavanya Dhanaraj
Thanks for sharing this! I was actually searching for something similar while working on a local file picker project. By the way, this reminded me of how I organized a small app for listing local files, kind of like how I was listing Dutch Bros menu prices for a small internal tool — keeping it clean and without extra navigation panes made a big difference. Great info here!
Malik, thanks for the feedback—glad it helped! A clean, pane-free layout is a great choice for both file pickers and list tools.
Please get back to us if you need any further assistance in future,
Thanks for sharing this! I was actually searching for something similar while working on a local file picker project. By the way, this reminded me of how I organized a small app for listing local files, kind of like how I was listing the Bob Evans menu for a small internal tool — keeping it clean and without extra navigation panes made a big difference. Great info here!
Thanks for the update. Please get back to us if you need any further assistance in future.
Thanks for sharing this! I was looking for something similar while working on a local file picker project. It reminded me of how I organized a small app to list local files—much like when I structured the texas roadhouse steak menu for an internal tool. Keeping everything simple and free of extra navigation panels really made a big difference. Great information overall!
Thank you for your feedback! We're glad you found the information helpful for your local file picker project. If you have any issues or need assistance, feel free to reach out anytime!
Regards,
Praveen Sellappan,