简体   繁体   中英

JScript Error after close RadWindow and Postback

I have a RadWindow to show comments when I click button of GridButtonColumn of a RadGrid. When I click, in the ItemCommand event of the RadGrid I have the following code:

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. However, after close the radwindow and reload the page, in a postback reload I have the following error: 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
  2. Set the DestroyOnClose property only if you need it. In most cases you don't.
  3. Do not add the RadWindow to the RadWIndowManager collection, it is rarely needed.
  4. Debug your server code, because the PageRequestManagerServerException is a server error trapped by MS AJAX as a client-side error. This will let you see what the actual exception is so you can fix it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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