Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Setting CascadingDropDown value via JavaScript/jQuery

$
0
0

I am able to successfully set the value of the parent drop down list in my CascadingDropDown controls.  However, I now need to trigger the web service of the child CascadingDropDown to refresh the contents before setting the value of the child.  I have read so many articles on this online but not one has a working solution.  I have tried:

$find('CCD_Parent')._onParentChange(null, null);

$('<%=CCD_Parent.ClientID%>')._onParentChange(null, null);

$('[id$=Parent]').change();

$('[id$=Parent]').trigger('onchange');

The last one was the closest in that the drop down populated but it did not populate with the category in the parent set correctly.  It is possible the way I am setting the parent is not correct.

$('[id$=Parent]').val(MyValue).attr('selected','selected');

Can someone help me figure this out?

NOTE: Parent is the mock ID of my drop down list control and CCD_Parent is the AJAX CascadingDropDown control.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>