This question is locked. New answers and comments are not allowed.
I'm using the ComboBox control, and I can't figure out how to get a reference to it in javascript. It functions correctly, just can't get a reference to it, client-side.
I declare it like this:
But when I try to get a reference to it using the technique from the help files, this alert returns a value of true. It always returns null:
What am I missing?
Thanks!
Andy
I declare it like this:
@(Html.Telerik().ComboBox() .Name("SourceSiteSelector") .AutoFill(true) .DataBinding(binding => binding.Ajax().Select("_AjaxSourceSiteLoading", "Common")) .Filterable(filtering => { filtering.FilterMode(AutoCompleteFilterMode.Contains); }) .ClientEvents(events => events.OnChange("SourceSiteSelector_onChange")) .HighlightFirstMatch(true) .HtmlAttributes(new { style = "width: 400px;" }) )But when I try to get a reference to it using the technique from the help files, this alert returns a value of true. It always returns null:
<script type="text/javascript"> function SourceSiteSelector_onChange() { var combo = $('#SourceSiteSelector').data('tSourceSiteSelector'); alert(combo == null); } </script> What am I missing?
Thanks!
Andy