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

RadWindow failing to load

2 Answers 52 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 04 Aug 2015, 01:01 AM

Hi All,

 

I have an issue with a RadWindow. It's got a RadTabStrip and a RadMultiPage on it.

On changing the Tab, I postback, and reload the window using :-

 

radWindow.Visible = True
Dim script As String = "function f(){$find(""" + radWindow.ClientID & """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

 

This works most of the time, but occasionally I get the following error (happens more on the WebSever vs Localhost) :-

 

<script type="text/javascript">
//<![CDATA[
function f(){$find("radWindow").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);
document.getElementById('vcmValidationSummary').dispose = function() {
    Array.remove(Page_ValidationSummaries, document.getElementById('vcmValidationSummary'));
}
//]]>
</script>

 

And the Error is "Microsoft JScrips runtime error: Unable to get value of the property 'show'; object is null or undefined".

It's as if the RadWindow hasn't been loaded. Any ideas where I'm going wrong?

2 Answers, 1 is accepted

Sort by
0
Ben
Top achievements
Rank 1
answered on 04 Aug 2015, 07:45 AM
Swapped to use 'VisibleOnPageLoad' instead. Now seems more stable, but would be nice to know why the other failed.
0
Eyup
Telerik team
answered on 06 Aug 2015, 08:47 AM
Hello Ben,

I'm glad you've managed to find a viable solution for your scenario. It is difficult to determine the exact cause of the initial error, however, in this scenario you can also use another cool approach - wrap the tabstrip and multipage within a RadAjaxPanel or add them to the AjaxSettings of a RadAjaxManager programmatically:
http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/radajaxmanager/how-to/add-ajaxsettings-programmatically
http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/troubleshooting/tips-and-tricks-for-ajaxifying-specific-controls#ajaxifying-radmultipage-and-radtabstrip-controls

This should prevent the postback effect.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Ben
Top achievements
Rank 1
Answers by
Ben
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or