|
Rank: Member Groups: Member
Joined: 4/8/2008 Posts: 19
|
I moved my application to the server and I am getting this message when I use sorting feature og a GridView. This error message DOES NOT generate always, when I refresh the page it was fine.
EO.Web.Controls ClientSide Message:
EO.Web control 'ct100_ContentPlaceHolder2_GridView1_ctl02_CallbaclPanel1' error message (set ClientSideOnError to handle thid error); The callback on 'ct100_ContentPlaceHolder2_GridView1_ctl02_CallbaclPanel1' has failed because the server did not recognize this call back and processed it as a normal request. This can occur if there are multiple Callback/CallbackPanel controls in the page, and this Callback/CallbackPanel control was initially dynamically loaded but wasn't loaded for this callback.
This can occur if you have called Response.Redirect on the server side. Callback/CallbackPanel provides a Redirect method for such scenario. Please use the Callback/Callbackpanel's redirect method in this case.
You can turn off this message by setting EO.Web.Runtime.DebugLevel to 0(Not recomended for debug build).
note: I never seen this error while I was developing ...
what is causing the problem ? can anyone suggest a permanent solution ?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The error happens when the CallbackPanel that initiated the AJAX call did not get recreated during the callback. Consider the following simplified scenario:
1. GridView is populated with only one record. This record creates some UI elements, including a CallbackPanel; 2. User clicks a "Refresh" button to triggers the CallbackPanel; 3. The GridView repopulate from the data source, however at this moment there is no more record in the database. So all the UI elements that were populated on step 1 are no longer populated. The CallbackPanel no longer exists; 4. The AJAX call can not find a CallbackPanel to process the call. Thus you get the message;
In the case of sorting similar thing happens. Even if the number of records does not change and the CallbackPanel always get created, they may get created with a different ID. For example, a CallbackPanel initially with ID 'ct100_ContentPlaceHolder2_GridView1_ctl02_CallbaclPanel1' now can have an ID of 'ct100_ContentPlaceHolder2_GridView1_ctl05_CallbaclPanel1'. When this happens, the AJAX call won't be able to find the original CallbackPanel to process the call.
The solution is to avoid dynamically creating CallbackPanel control. Use a single CallbackPanel and place the whole GridView inside the CallbackPanel should solve the problem.
Thanks
|
|
Rank: Member Groups: Member
Joined: 4/8/2008 Posts: 19
|
Thankyou eo_support for quick responce.
Actually I am using GridView inside each row of another GridView. The inside grid having the callback panel around it and the inside GridView is having the sorting capability on its columns. This error is happening when I kept the grid view page un attended for few minutes (let us say 15 minutes or more) and go back to the page and click on column header for some sorting.
I understood your scenario in case of dynamiccaly generated grids, but in my case the number of records were same. Is the error generated by any session end or something else ? (just wanted to share my thought, I will try your method, if it could fix the problem, actually for me it is tough to reproduce the same error, it is rare)
Thanks for the help.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
RAM wrote:Is the error generated by any session end or something else ? That certainly can be the case. In case your session times out and the server redirects to another page (typically login page), the same happens --- the original CallbackPanel is no longer there. Automatic redirection is something that we were thinking about supporting but due to a few implications on several implementation details, it's not fully supported yet. We will continue to work on it to see if we can support that. If you wish to gracefully handle the error, you can handle the CallbackPanel's ClientSideOnError event. Check for "wrong_server_response" error and try to do a refresh. That should get everything going again. Thanks
|
|