I encountered an error when attempting to configure an AutoComplete data source on an Intranet web site. The site uses Windows Authentication (ASP.Net MVC3). The AutoComplete only loaded data 1/10 of the time (roughly). Otherwise it would flicker a little, but no data would appear. Works fine in Chrome.
There is only one workaround that I found that made it work 100% of the time: Force IE-7 compatibility mode in the HTML. That workaround is not preferable.
Any ideas?
UPDATE: Removed references to a second workaround, which on further testing did not end up working.
Here's my HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>New Project</title>
<script type="text/javascript" src="/Scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/Scripts/kendo.all.min.js"></script>
<link type="text/css" href="/Content/kendo.common.min.css" rel="stylesheet"/>
<link type="text/css" href="/Content/kendo.custom.min.css" rel="stylesheet"/>
</head>
<body>
<input id="ContactDescription" name="ContactDescription" type="text" value="" />
<script type="text/javascript">
$(document).ready(function () {
var contactAutoCompleteDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/Ajax/EmployeesList",
dataType: "json",
data: {
showAll: function () {
return $('#showAll').is(':checked');
}
}
}
},
change: function (e) {
//alert('Total records: ' + contactAutoCompleteDataSource.total()); // This displays ~500
}
});
$('#ContactDescription').kendoAutoComplete({
minLength: 2,
filter: "contains",
dataTextField: "title",
dataSource: contactAutoCompleteDataSource
});
$('#showAll').click(function (e) {
contactAutoCompleteDataSource.read();
});
});
</script>
</body>
</html>
There is only one workaround that I found that made it work 100% of the time: Force IE-7 compatibility mode in the HTML. That workaround is not preferable.
Any ideas?
UPDATE: Removed references to a second workaround, which on further testing did not end up working.
Here's my HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>New Project</title>
<script type="text/javascript" src="/Scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/Scripts/kendo.all.min.js"></script>
<link type="text/css" href="/Content/kendo.common.min.css" rel="stylesheet"/>
<link type="text/css" href="/Content/kendo.custom.min.css" rel="stylesheet"/>
</head>
<body>
<input id="ContactDescription" name="ContactDescription" type="text" value="" />
<script type="text/javascript">
$(document).ready(function () {
var contactAutoCompleteDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/Ajax/EmployeesList",
dataType: "json",
data: {
showAll: function () {
return $('#showAll').is(':checked');
}
}
}
},
change: function (e) {
//alert('Total records: ' + contactAutoCompleteDataSource.total()); // This displays ~500
}
});
$('#ContactDescription').kendoAutoComplete({
minLength: 2,
filter: "contains",
dataTextField: "title",
dataSource: contactAutoCompleteDataSource
});
$('#showAll').click(function (e) {
contactAutoCompleteDataSource.read();
});
});
</script>
</body>
</html>