Harlem 98

Harlem 98

  • NA
  • 161
  • 18.5k

Javascript exception when opening window for the second time

Dec 14 2021 3:29 PM

Hello community.

I'm performing CRUD operations on a TelerikRadWindow, which works fine at the first time but when i try to do it a second time throws Javascript exception "Uncaught TypeError: Cannot read properties of null (reading 'show') at openRadWindow". Any ideas on what it could be? Thank you in advance!

// window code, which bounds a child user control containing the crud form

<div class="form" runat="server" id="divUC" >
    <telerik:RadWindowManager RenderMode="Lightweight" ID="radInfoWindow" runat="server" DestroyOnClose="true" CommandName="Confirmar" ShowContentDuringLoad="false" language="pt-PT">             
                    <Windows>
                        <telerik:RadWindow RenderMode="Lightweight" ID="UserListDialog" runat="server" Title="Editar Timesheets" Height="400px"
                            Width="800px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false" 
                            Modal="true" DestroyOnClose="true" VisibleStatusbar="False"
                            Behaviors="Close,Move,Resize" CssClass="opaque"  KeepInScreenBounds="True" AutoSize="false" 
                        >
                            <ContentTemplate>
                                <uc1:ViewEmissaoTimeSheetEdit ID="EditTimesheet" runat="server"  />
                            </ContentTemplate>
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>   

//JS

function openRadWindow() {
            var radwindow = $find('<%=UserListDialog.ClientID %>');
           radwindow.show();
        }

 


Answers (1)