This is a migrated thread and some comments may be shown as answers.

Unexpected data with ServerSideCallback causes issues

2 Answers 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 09 Oct 2009, 01:38 PM
Hi.

If you have a RadTreeView with ServerSideCallBack mode on nodes, and the post-back caused by expanding these nodes causes something unexpected to happen, like a Response.Redirect (302 response) or errors (5xx responses) or something, the node will just appear to be loading its child nodes forever. The OnClientNodePopulationFailed function isn't called, and there's no error message. The node just pretends it's loading the child nodes forever.

How can I work around this? There are situations in our project that causes unexpected things to happen during post back sometimes, and we need to be able to handle them. Ever-loading tree nodes without any messages will not please our customers. It works fine if it's a regular post back (even through the UpdatePanel from the ASP.NET AJAX toolkit.)

2 Answers, 1 is accepted

Sort by
0
Vesko
Top achievements
Rank 2
answered on 15 Oct 2009, 06:12 AM
As far as I know if you throw a new Application exception from the NodeExpand server event then the OnClientNodePopulationFailed client event will fire.

Note that you might need to set the customErrors mode to Off in the web.config:

<customErrors mode="Off"></customErrors>
0
Dave Pellegrin
Top achievements
Rank 1
answered on 21 Jan 2010, 11:11 PM
I get the same problem when exceptions occur before the NodeExpand event occur in the page lifecycle.  I would like to at least present something to the user if an unexpected exception occurs...   OnClientNodePopulationFailed is not firing even though there a 500 error returned.
Tags
TreeView
Asked by
Alexander
Top achievements
Rank 1
Answers by
Vesko
Top achievements
Rank 2
Dave Pellegrin
Top achievements
Rank 1
Share this question
or