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

RadFileExplorer in a RadNotification Issue

1 Answer 58 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Ebonie
Top achievements
Rank 1
Ebonie asked on 09 Jan 2015, 03:45 AM
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.

Tnx
Marcel


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Jan 2015, 03:39 PM

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">
    <ContentTemplate>
        <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Width="300px" Height="300px">
            <Configuration ViewPaths="~/Images" DeletePaths="~/Images" UploadPaths="~/Images" />
        </telerik:RadFileExplorer>
    </ContentTemplate>
</telerik:RadNotification>
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    RadNotification1.Show()
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
Telerik
 

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.

 
Tags
FileExplorer
Asked by
Ebonie
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or