[DevExpress Support Team: CLONED FROM T264172: ASPxFileManager - How to set the SelectedFile property by creating the FileManagerFile object]
I'm trying to accomplish the same task in 15.1.6, but fail to do so. I have a custom provider as well and your sample works fine for me, but in my real app I need to select a file when the page is initially loaded. So, I tried both ASPxFileManager1.SelectedFile = ASPxFileManager1.SelectedFolder.GetFiles()[0] and the suggested ASPxFileManager1.SelectedFile = new FileManagerFile(ASPxFileManager1.CustomFileSystemProvider, "Folder2/text.txt"), but neither worked for me.
Then, I created a very basic sample with the standard provider and just one line of code, but it did not work for me either. I feel that I'm missing something obvious here… I've attached the sample to this post - please make it select a file (any file) when the page is initially loaded.
I'm using a hotfix (15.1.6.15245), if that matters.
Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co
ASPxFileManager - File is not selected on the server side on the first page load
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v15.2.4Download Official Update
- v15.1.8Download Official Update
Well, the hotfix fixes the very basic version of the issue: selection of a file from a local file system during page initial load. However, it still does not work for my custom provider. My provider is based on your sample from the following help topic:
https://documentation.devexpress.com/#AspNet/CustomDocument9935
It requires a database, so it would be hard to send it to you. So, could you please check whether the hotfix will work properly for a sample project using the mentioned custom provider? If it will, send me your sample project and I'll see what I can do to make it expose the problem.
Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T296133: ASPxFileManager - It is impossible to select file on the server side when a custom FileSystemProvider is used. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hello,
I've reproduced this behavior on my side and passed this the ticket to our developers.
We will research the issue and let you know the results.
Regards,
Pavlo