Sorry for everything being marked as code. It wouldn't let me post it unless I did (and, yes, I did try using the Inline Code option as you can see by the single quotes around much of what is written here).
I have a page with an updatepanel that contains two `ajaxToolkit:CascadingDropDown` controls.
I am trying to populate them after the page loads using javascript and/or JQuery. However, with all of the methods I've tried, the javascript runs before `cascadingdropdown` controls have rendered. It finds the initial `dropdownlist` controls just fine, but the cascadingdropdown controls return null.
I know the javascript function I'm calling is good, because it works if I make a button on the page call my function. So, it seems like the function is firing too early.
I've tried to fire it using `window.load`, `document.ready`, by registering a client startup script in my code behind, and by just calling the function in script tags located at the bottom of my aspx page. I've also tried adding a two second delay at the start of the function by waiting for the clock to reach now plus two seconds.
To summarize
My function works, but is just not being called at the correct time. Where and when do I need to call it for the page to truly be finished loading all my controls?
Thanks,
JTok
jtok 10 Light Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
jtok 10 Light Poster
Daniele_3 commented: Sorry , re begin, you wrote cddl1.set_SelectedValue("My Text", "My Value"); you can tell more about set_SelectedValue? Thanks +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.