I'm trying to open a RadWindow from a RadGrid in a web user control from server-side code using the RadAjaxManager in my Master Page (this is .NET 2 and VS2005). In the ItemCommand event of my RadGrid I'm calling the following line of code:
The first time I run it I get the following error:
Sys.WebForms.PageRequestManagerParserErrorException: The message received From the server could not be, parsed. Common causes for this error are when the response is modiFied by calls to Response.WriteO, response filters, HttpModules, or server trace is enabled
Details: Error parsing near 'play:none;”>/span>|<html>
Every time I select a row in the grid after cancelling this message, the dialog will load but the data does not change after the first time it loads.
Does anyone have any suggestions or sample of how I could do this? Following is a link to a test project where I've been able to reproduce the problem:
EDIT: I've updated the zip file referenced below to reflect the curernt state of this post.
Just click on one of the link buttons in the grid to get the error. This is where I'd like to launch the window.
9 Answers, 1 is accepted
Yes, you are right about what each parameter is for. But note that if the second parameter is 'null', and you have RadWindowManager on the page, then new RadWindow will be open.
And on my side even this line opens new window:
This is all the code from my test page:
Try it and see if it works with you.
Session["EventID"] = EventID;
For some reason the RadAjaxManager doesn't like this. In my test project I was able to get past this error by changing the line to:
.Page.Session["EventID"] = EventID;
Apparently since this is happening in a user control, I had to explicitly call the page session; otherwise, it tried to use a session object for user controls under System.Web.UI. I made a similar change in my main project code, but it still has not fixed my problem. At least now I know the problem has nothing to do with grids, or windows. It is apparently something with setting a session value prior to making a call to RadAjaxManger. Any suggestions would be greatly appreciated.
I hope the last issue could be overcome by setting the ReloadOnShow property of the window to true.
I hope this helps.
Can you please specify what type of error you receive in this particular case? Is it possible that the error you encountered when attempting to set a value in the Session is related to the subject discussed in this blog post? Try to apply the solution explained there and let me know whether this helps.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.