@Html.EJS().FileManager("filemanager").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings
{
Url = "/Home/FileOperations",
GetImageUrl = "/Home/GetImage",
UploadUrl = "/Home/Upload",
DownloadUrl = "/Home/Download"
}).View(Syncfusion.EJ2.FileManager.ViewType.Details).FileOpen("onFileOpen").DetailsViewSettings(new Syncfusion.EJ2.FileManager.FileManagerDetailsViewSettings
{
Columns = new List<Syncfusion.EJ2.FileManager.FileManagerColumn>
{
new Syncfusion.EJ2.FileManager.FileManagerColumn()
{
Field="name", HeaderText = "File Name", MinWidth = "120", Width = "auto"
},
new Syncfusion.EJ2.FileManager.FileManagerColumn()
{
Field="dateModified", HeaderText = "Date Modified", MinWidth = "50", Width = "auto"
},
new Syncfusion.EJ2.FileManager.FileManagerColumn()
{
Field="size", HeaderText = "Size", MinWidth = "50", Width = "50"
},
new Syncfusion.EJ2.FileManager.FileManagerColumn()
{
Field="author", HeaderText = "Author", MinWidth = "50", Width = "50"
}
}
}).Render() |
@Html.EJS().FileManager("file").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings
{
Url = "/Home/FileOperations",
GetImageUrl = "/Home/GetImage",
UploadUrl = "/Home/Upload",
DownloadUrl = "/Home/Download"
}).View(Syncfusion.EJ2.FileManager.ViewType.Details).FileLoad("fileLoad").Render()
<script>
function fileLoad(args) {
var filemanager = document.getElementById("file").ej2_instances[0];
if (
filemanager.breadcrumbbarModule.searchObj.element.value != "" &&
args.module == "DetailsView"
) {
var anchorTag = document.createElement("a");
var path_element = args.element.lastElementChild;
anchorTag.setAttribute("rel='nofollow' href", args.element.lastElementChild.innerText);
anchorTag.innerText = args.element.lastElementChild.innerText;
path_element.innerText = "";
path_element.appendChild(anchorTag);
}
}
</script> |