This question is locked. New answers and comments are not allowed.
When I select an option from the drop down with my mouse or using the enter key I receive this error: Microsoft JScript runtime error: 'Text' is null or not an object. If I type out my selection I do not get the error. I am binding the data to the drop down using jquery.
What is causing this error and how can I fix it?
View:
Js: (I only added the code that I thought was relevant)
What is causing this error and how can I fix it?
View:
columns.Bound(x => x.MaintenanceId) .HeaderTemplate(@<text>Maint ID<br/> @(Html.Telerik().AutoComplete() .Name("acGridMaintIDSelected") .ClientEvents(events => events.OnDataBinding("workOrderList.onAutoCompleteDataBinding")) .Filterable(f => f.MinimumChars(3)) .Encode(false) .AutoFill(true) .HtmlAttributes(new { @class = "wogridInputbox", style = "width:80px; height:16px" }) .HighlightFirstMatch(true) .Multiple(m => m.Enabled(false)) ) </text>) .ClientTemplate(Html.ActionLink("<#=MaintenanceId#>", "View", "ViewWorkOrder", new { Area = "WorkOrders", id = "<#=WorkOrderId#>" }, null).ToHtmlString());(function (rite, workOrderList, $, undefined) {
var $m = workOrderList;
$m.init = function () {
$m.onAutoCompleteDataBinding = function (e) { var autocomplete = $(this).data('tAutoComplete'); var dataSource = [$(this).val()]; autocomplete.dataBind(dataSource, true); var filterTypeAndValue = { 'filterType': $(this).attr('id'), 'filterValue': $(this).val() }; rite.json({ action: '_GridAutoCompleteAjaxLoading', controller: 'WorkOrderList', data: filterTypeAndValue, success: function (json) { autocomplete.dataBind(json, true); } }); };
})(window.rite = window.rite || {}, window.workOrderList = window.workOrderList || {}, jQuery);
$(document).ready(function () {
workOrderList.init();
});