This is a migrated thread and some comments may be shown as answers.

getSelected() method not resetting.

1 Answer 50 Views
FileManager
This is a migrated thread and some comments may be shown as answers.
hassan
Top achievements
Rank 1
Iron
hassan asked on 09 Apr 2021, 12:24 PM

Hi,

i was working on MVC project and rendered the filemanager in view with helpers.

after first loading the filemanager i did select a file and using "getSelected()" method, it returns an array of "FileManagerEntry" for each selected file.

when you load the second time it shows no files selected and in this case when i call the same "getSelected()" method, still it returns  1 record. i was expecting to be 0.  can you please let me know what would be the issue.

 

Thanks

Regards

Hassan.

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 14 Apr 2021, 09:10 AM

Hi Hassan,

In order to test the behavior reported I added a button to the Basic Usage Demo of the FileManager that would alert the selected files/folders:

function getSelectedItems(e) {
        var filemanager = $("#filemanager").getKendoFileManager();
        var notification = '';
        if (!(filemanager.getSelected())) {
            notification = "Nothing selected"
        } else {
            console.log(filemanager.getSelected());
            notification = 'Files/folders selected: ' + filemanager.getSelected().map(x => x.name).join(' ,');
        }
        kendo.alert(notification);
    }

On initial load there are no files/folders selected. Upon navigating into a folder, but without selecting a file the folder is actually selected and is displayed as a result. Selecting a file in the folder changes the selection to the file. Here is a screencast to demonstrate the above. Am I missing something in the scenario you have? Can you share additional details in order to reproduce the behavior, in case the above does not clarify what you have observed?

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
FileManager
Asked by
hassan
Top achievements
Rank 1
Iron
Answers by
Aleksandar
Telerik team
Share this question
or