AJAX CascadingDropdown - Setting the selected index
Posted
by RPM1984
on Stack Overflow
See other posts from Stack Overflow
or by RPM1984
Published on 2010-05-05T07:15:14Z
Indexed on
2010/06/07
0:12 UTC
Read the original article
Hit count: 272
I have a CascadingDropDown on an ASP.NET page.
Now, the prompt text is "Select State". (list of states).
However, on a different version of this page (ie querystring), i might want to set the selected index to "California" for example.
How can i do this?
The web service used by the ajax control (ie GetStates) gets invoked at the same time the jquery document.ready function is triggered (ie asynchronously).
So when i try and set the selected index in jquery, the items are not yet bound.
Is there a way to attach a handler to the ajax dropdown so that i can set the selected index once the webservice call has completed, and the items are bound?
© Stack Overflow or respective owner