简体   繁体   English

关闭RadWindow和回发后的JScript错误

[英]JScript Error after close RadWindow and Postback

I have a RadWindow to show comments when I click button of GridButtonColumn of a RadGrid. 单击RadGrid的GridButtonColumn的按钮时,我有一个RadWindow显示注释。 When I click, in the ItemCommand event of the RadGrid I have the following code: 单击时,在RadGrid的ItemCommand事件中,我有以下代码:

protected void rgQualityReport_OnItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "ShowComment")
    {
        // to do
        GridDataItem dataItem = e.Item as GridDataItem;
        comments.Content = dataItem["ColumnDate"].Text;
        this.modalPopupComments.VisibleOnPageLoad = true;
        RadWindowManager1.DestroyOnClose = true;
        RadWindowManager1.Controls.Add(modalPopupComments);                      
    }
}

The problem is the following: 问题如下:

When I click the button, the radwindow is showed correctly. 当我单击按钮时,正确显示了radwindow。 However, after close the radwindow and reload the page, in a postback reload I have the following error: sys.webforms.pagerequestmanagerservererrorexception JSCRIPT error . 但是,关闭radwindow并重新加载页面后,在回发重新加载中,我遇到以下错误: sys.webforms.pagerequestmanagerservererrorexception JSCRIPT error

Can you help me, please? 你能帮我吗?

Thanks! 谢谢!

  1. Open the RadWindow from the server as shown here: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html 从服务器打开RadWindow,如下所示: http : //www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html
  2. Set the DestroyOnClose property only if you need it. 仅在需要时设置DestroyOnClose属性。 In most cases you don't. 在大多数情况下,您不需要这样做。
  3. Do not add the RadWindow to the RadWIndowManager collection, it is rarely needed. 不要将RadWindow添加到RadWIndowManager集合中,这是很少需要的。
  4. Debug your server code, because the PageRequestManagerServerException is a server error trapped by MS AJAX as a client-side error. 调试服务器代码,因为PageRequestManagerServerException是MS AJAX捕获为客户端错误的服务器错误。 This will let you see what the actual exception is so you can fix it 这将使您看到实际的异常是什么,以便您可以对其进行修复

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM