RadFileExplorer in a RadNotification Issue

2 posts, 0 answers
  1. Ebonie
    Ebonie avatar
    1 posts
    Member since:
    Sep 2014

    Posted 08 Jan 2015 Link to this post

    I cannot get the RadNotification to display from a button click (.Show) if I put a RadFileExplorer control in it. I get an error of 'Uncaught TypeError: Cannot read property 'getContentElement' of null'.

    Is this achievable? I'm trying to create a 'sidebar' where the user can navigate files.


  2. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 12 Jan 2015 Link to this post

    Hello Marcel,

    I have already answered you ticket with the same question and I am pasting my reply here for anyone else that may have a similar case. If you have outstanding questions, I suggest we continue the discussion in the ticket and you can post the final resolution here for all to see when we reach a conclusion.

    Generally, RadNotification's ContentTemplate is a RadXmlHttpPanel control which is designed to invoke client callbacks, and RadFileExplorer uses both AJAX requests and callbacks internally. Thus, if such nesting of requests/update panels occurs, you may get errors. Thus, it is best if the LoadContentOn property of the notification is set to PageLoad (the default value) and you do not invoke additional requests for updating it.

    Here is a small example that seemed to work fine for me:

    <asp:Button ID="Button1" Text="show RN" runat="server" />
    <telerik:RadNotification ID="RadNotification1" runat="server" AutoCloseDelay="0" Width="320px" Height="350px" Position="Center">
            <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Width="300px" Height="300px">
                <Configuration ViewPaths="~/Images" DeletePaths="~/Images" UploadPaths="~/Images" />
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    End Sub

    Thus, it would be better to place it in the ContentTemplate of a RadWindow control. You can see how to show it from the server here: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html. You can resize and pin it when it is shown so you can have it in the desired position: http://www.telerik.com/help/aspnet-ajax/window-client-side-events-onclientshow.html.

    Regards, Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top