This project is read-only.
3
Vote

"DropDownScript" is undefined error

description

Hello,
Great job!!!
Control is working great when directly placed on page, but throwing 'DropDownScript is undefined' exception when trying to place it inside DetialsView. Please suggest, thanks

file attachments

comments

mdrafi87 wrote Sep 30, 2012 at 1:55 PM

Hello ,
Great Control i have ever seen working perfectly in page load .But dropdown onselectedIndexchange The control is throwing error "DropDownScript" is undefined error.
Thaks,
       waiting for your replay.

mathaus101 wrote Feb 19, 2013 at 4:52 AM

Hi, I'm getting the same error. If I change the DropDownCheckboxes control visibility to true on a UpdatePanel postback, I get a "Microsoft JScript runtime error: 'DropDownScript' is undefined". The client-side script may not be registering. I'm wondering if tehre is a work-around for this, other than refreshing the entire page?

mathaus101 wrote Feb 19, 2013 at 5:42 AM

Fixed the issue in my case, just needed to add dd.AddJQueryReference = true; in the codebehind.

ruthlessluder wrote Feb 28, 2013 at 8:45 PM

I ran into the same issues with "dropdownscript" not defined error. I have a repeater with the DropDownCheckBoxes controls inside the ItemTemplate of the repeater. When I tried to databind the controls in code behind that's when I got that error.

If the control is used declaratively everything is fine. So my workaround is to declaratively put a control on the page and set its display property to false. (The Visible must be true otherwise the required scripts won't be added)
<div style="display:none"> <asp:DropDownCheckBoxes ID="ddcbPlaceHolderToAddRequiredScripts" runat="server" Visible="true"> </asp:DropDownCheckBoxes> </div> If anyone has a better solution please let me know.

RuudvK wrote Sep 11, 2013 at 10:15 AM

AddJQueryReference = true gave me a js error in the jquery itself.
ruthlessluder's workaround however, does work for me as well. But indeed, this is a workaround and not really a solution. I'm very curious if someone has solved this in a different way.