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

HowToModalDialog Not Calling InitializeDialog

1 Answer 36 Views
Window
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 2
Greg asked on 18 Apr 2009, 12:14 AM
I am working on the HowToModalDialog in the tutorial. The ContactDetails InitializeDialog function is not being called when the AddressDialog is shown.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 22 Apr 2009, 04:17 AM
Hi Greg,

I tested this demo and I saw that the initialize() function is called. Please note that this function should be called only the first time when the Address dialog is shown. If you need to force that function to be called  every time, you need to set the ReloadOnShow property of the Address dialog window to "true".
In this case the content page will be reloaded every time when the window is showed and the initialize() function will be called as well. In such scenario however, you need to use the Sys.Application.Load event. The reason is that we are working in an ASP.NET AJAX environment and in AJAX, all ASP.NET AJAX controls, including RadControls are created after the page is loaded (you can check that by examining the HTML dump). If you do not use that event, then when you try to execute the script on page's load, RadTextBoxes will still not be rendered on the page which will cause the error(you will not be able to get reference to them).
For your convenience I have attached the modified demo to this thread.

I hope this helps.

Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Greg
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Share this question
or