When a user edits a row in my RadGrid, a popup form is used to edit it. The WebUserControl that is used will vary depending on what is being edited. I set the WebUserControl as follows:
In PropertyListsNumber.ascx I have another user control. This nested control is a RadComboBox. The combobox is populated with checkboxes and javascript is used to concatenate the checked selections, as shown in one of the Telerik demos. The combobox does get populated but when you go to check off an item in the dropdown, a run-time error occurs indicating that the object could not be found. I have verified that my Javascript code is correct.
It isn't even possible to set a breakpoint or open any script in VS to set one. Even using "debugger;" will not work. After playing around with the code, I moved the javascript outside of the nested control and put it into a normal javascript file and had the script registered from the page hosting the control that was hosting the nested control. I was able to get a breakpoint to work although this really didn't help to solve my problem. What it did tell me is that if the script is not registered, it cannot get executed. I was under the impression that any user controls, no matter how nested they are, all get merged and the scripts get executed. That does not seem to be the case. If you look at the code I am showing above, the user control gets set at run-time, so it appears that ASP.NET is not even aware of the script since it could not have gotten registered at runtime, which might explain why it isn't getting executed.
I also tried using RegisterScriptBlock and RegisterCodeBlock inside the nested control but that did not help either.
So how can I get the script in the nested control to get executed? Or maybe even more to the point, how can I get it registered?
Thanks
Johann