Bug Report T288091
Visible to All Users

ASPxFileManager - Script error is thrown when a selected item does not exist in the control hierarchy after a postback

created 9 years ago (modified 9 years ago)

I have submitted a support ticket earlier (yesterday) on the same subject.
I thought the problem was solved, but it is not.
The problem is:
I have a combobox which opens the enabled folders fo a user depending on his logon info.
The filemanager is opened according to the selected folder in the combobox.
This seems to work ok when you are in the same root folder, but whyen you change the rootfolder it "hangs".
The example you made at devexpress has the same rootfolder all the time

Code for the combobox:

ASPx
<dx:ASPxComboBox ID="cboDineMapper" runat="server" DataSourceID="SqlDineMapper"            TextField="Mappe" ValueField="Mappe" ValueType="System.String" AutoPostBack="True" OnSelectedIndexChanged="cboDineMapper_SelectedIndexChanged" NullText="Velg mappe"> </dx:ASPxComboBox>

C#

C#
protected void cboDineMapper_SelectedIndexChanged(object sender, EventArgs e)    {        string strValgtMappe = cboDineMapper.SelectedItem.ToString();        ASPxFileManager2.Visible = true;        ASPxFileManager2.Settings.RootFolder = "~/Mapper/" + strValgtMappe;    }

Code for the FileManager:

ASPx
<dx:ASPxFileManager ID="ASPxFileManager1" runat="server" EnableTheming="True" Theme="Glass" Height="410px" Width="468px"                 OnSelectedFileOpened="ASPxFileManager1_SelectedFileOpened" ToolTip="Dobbelklikk for å velge fil til vedlegg" >                 <Settings RootFolder="~\Mapper" ThumbnailFolder="~\Mapper" InitialFolder="~\Mapper" />                 <SettingsFileList View="Details">                     <DetailsViewSettings>                         <Columns>                             <dx:FileManagerDetailsColumn Caption="Filnavn" FileInfoType="FileName" Width="180">                             </dx:FileManagerDetailsColumn>                             <dx:FileManagerDetailsColumn Caption="Dato endret" FileInfoType="LastWriteTime" Width="90">                             </dx:FileManagerDetailsColumn>                         </Columns>                     </DetailsViewSettings>                 </SettingsFileList>                 <SettingsEditing AllowDownload="True" AllowCreate="True" AllowDelete="True" />                 <SettingsToolbar ShowFilterBox="False" ShowPath="False">                 </SettingsToolbar>                 <SettingsLoadingPanel Text="Vent...&hellip;" />                 <Styles>                     <File Width="80px">                     </File>                     <FolderContainer Width="150px">                     </FolderContainer>                 </Styles> </dx:ASPxFileManager>

c#

Answers approved by DevExpress Support

created 9 years ago

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.

    Comments (2)
    RT RT
    Reidar Thorsvik 9 years ago

      I have installed the hotfix and upgraded my project, but how do I know that the hotfix
      have been implemented, because my references all say 15.7 and not 15.1.78

      Nastya (DevExpress Support) 9 years ago

        Hello Reidar,
        If I understand you correctly, you expect the 15.1.8 version to be displayed in your references. The current installation tool is a hotfix, i.e. the fixed 15.1.7. So, the version will be also displayed as 15.1.7. You can check the version you're using in the list of installed programs on your OS or by invoking the ASPx.VersionInfo  in the browser console for your web application.
        The "Fixed in builds: 15.1.8" line means that when the 15.1.8 version is released, it will include the current fix.

        created 9 years ago

        Hi,

        Once you changed the RootFolder and Visible properties on a postback (in the SelectedIndexChanged event handler), they need to be restored on further trips to the server in the Page.Init/ASPxFileManager.Init  event handler. For example,  you can use the Session object to store the current path.

        Let us know if this helps.

          Show previous comments (2)
          Vova (DevExpress Support) 9 years ago

            Hello,

            I've reproduced this issue and forwarded it to our R&D team for research. We will inform you as soon as we have any updates.

            RT RT
            Reidar Thorsvik 9 years ago

              If you please could make it high priority. This is the last point from delivery to my customer, and I want to start on Part 2 of the application.
              Thank you in advance.

              DevExpress Support Team 9 years ago

                Hello Reidar,

                I am sorry for the delayed response. Our developers are working on resolving this problem. I have forwarded to them your requirements about the high priority of this issue.
                You patience is highly appreciated.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.