Hi
I need configure filemanger default sort order by datemodified descending, how can I do this?
Thanks in advance!
|
public async Task success(SuccessEventArgs<FileManagerDirectoryContent> args)
{
await jsRuntime.InvokeAsync<object>("accessDOMElement");
} |
|
<script>
function accessDOMElement() {
var root = document.getElementById('file-manager');
setTimeout(function () {
// You can get the datemodified header and perform the click operation.
root.querySelectorAll('.e-headercell')[3].click();
}, 1000);
}
</script> |
Hi Indhumathy
Thanks for your support!
I tried to run your sample on my end, but I receive "undefined" in this line
root.querySelectorAll('.e-headercell')[3].click();
My solution uses wasm and fabric theme
Plese help!
Hi Sharon
Thans for you kind response
In my side, not works... I put some console.logs in javascript code for get more information....
VM86 login-callback:112 Uncaught TypeError: Cannot read property 'click' of undefined
Please help...
|
function accessDOMElement() {
setTimeout(function () {
var root = document.getElementById('file-manager');
// You can get the datemodified header and perform the click operation.
root.querySelectorAll('.e-grid .e-headercell')[3].click();
}, 5000);
} |
|
<SfFileManager TValue="FileManagerDirectoryContent" ID="file-manager" View="ViewType.Details">
……
</SfFileManager> |
|
window.accessDOMElement = function () {
console.log("start: " + Date.now());
setTimeout(function () {
console.log("inside set timeout: " + Date.now());
var root = document.getElementById('file-manager');
console.log("root: " + root);
// You can get the datemodified header and perform the click operation.
root.querySelectorAll('.e-headercell')[3].click();
}, 5000);
} |
Hi Indhumathy
I changed my code following your suggestion, but not works
The information you requested is
Version 19.2.0.46
WebAssembly 5.0.7
Yes, I have the component inside SfTab whit this 3 tabs, in last tab I have FileManager
<SfTab @ref="Tab"
@bind-SelectedItem="SelectedTab"
ID="Tab"
CssClass="default-tab"
LoadOn="ContentLoad.Demand"
EnablePersistence="false">
<TabItems>
...
<TabItem Visible="@FileManagerVisible">
<ChildContent>
<TabHeader Text="Archivos"></TabHeader>
</ChildContent>
<ContentTemplate>
<SfFileManager ID="file-manager"
@ref="filemanager"
TValue="FileManagerDirectoryContent"
AllowDragAndDrop="true"
@bind-SelectedItems="selectedItems"
ShowFileExtension="false"
@bind-View="view">
...
2 questions:
- Can you also provide a solution for sorting when working with the Large icons view (column Modified not visible)?
- Can you also provide a solution for sorting the navigation pane?
Can you show me a sample on how to sort the Navigation Panel by CreatedDate descending (not by folder name) with these new features?
|
<FileManagerNavigationPaneSettings SortOrder="SortOrder.Descending"></FileManagerNavigationPaneSettings> |