or
We have a page with Kendo UI grid and simple search field with Kendo UI Autocomplete inititated on it. Search field has a placeholder "Type resource key".
On any version of internet explorer, when user navigates grid using pagination, the "GetResourceValues" function, that populates grid, gets search field's placeholder value as request parameter:
sort=&page=2&pageSize=25&group=&filter=&language=-&searchKeyword=Type+resource+key&resourceType=
While in other browsers the request looks like this:
sort=&page=3&pageSize=25&group=&filter=&language=-&searchKeyword=-&resourceType=
This leads to empty grid results after using pagination. Can it be Kendo UI bug?
Here is part of the code:
@(Html.Kendo().Grid<ResourceViewModel>()
.Name("resourcesList")
.Events(e => e.DataBound("handleDataBound"))
.Pageable()
.Resizable(resizable => resizable.Columns(true))
.ClientDetailTemplateId("resourceDetailsTemplate")
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("errorHandler"))
.ServerOperation(true)
.Batch(false)
.Model(model => model.Id(res => res.Id))
.Create(create => create.Action("CreateResource", "Resources"))
.Update(update => update.Action("UpdateResource", "Resources"))
.Destroy(destroy => destroy.Action("DeleteResource", "Resources"))
.Read(read => read.Action("GetResources", "Resources").Data("searchCriteria"))
.PageSize(25))
.Sortable()
.Scrollable()
.ToolBar(factory =>
factory.Template(@<text>
<div class="k-grid-toolbar-row">
<input id="resourceSearch" class="k-grid-toolbar-search-field" />
</div>
</text>)))
<script>
$(document).ready(function () {
var autocompleteSymbol = $("#resourceSearch").kendoAutoComplete({
dataTextField: "Key",
minLength: 2,
dataValueField: "Key",
filter: "contains",
placeholder: "Type resource key",
dataSource: {
type: "json",
transport: {
read: "Resources/GetAutoComplete",
maxRows: 50000
}
},
change: filterResources
});
});
</script>
@(Html.Kendo().ListView<AttachedFile>() .Name("attachedFilesListView") .TagName("div") .ClientTemplateId("attachedFilesTemplate") .DataSource(dataSource => dataSource .Model(model => { model.Id(f => f.AttachedFileID); model.Field(f => f.EntityTableKey).DefaultValue(Model.CorrectiveActionItemID); }) .Read(read => read.Action("Files_Read", "CorrectiveActionItem", new { correctiveActionItemId = Model.CorrectiveActionItemID })) .Destroy(destroy => destroy.Action("Files_Delete","CorrectiveActionItem")) .PageSize(4) ) .Pageable() .Editable())@model AttachedFile@(Html.Kendo().Upload() .Name("files") .Async(a => a.Save("SaveFile", "CorrectiveActionItem", new { correctiveActionItemId = Model.EntityTableKey }) .AutoUpload(true)))@(Html.Kendo().ComboBoxFor(model => model.AffectedUser) .Placeholder("Choose One...") .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.Contains) .AutoBind(false) .DataSource(dataSource => dataSource .Read(read => read.Action("GetUserList", "User")) .ServerFiltering(true) ))public class UserController : Controller { public JsonResult GetUserList(string group, string filter) { var items = new List<SelectListItem>();
for (int i = 1; i <= 500; i++) { items.Add(new SelectListItem { Value = i.ToString(), Text = "John"}); } items.Add(new SelectListItem { Value = "Jane", Text = "Jane" }); return Json(items.AsEnumerable(), JsonRequestBehavior.AllowGet); } }
@(Html.Kendo().MobileApplication().ServerNavigation(false) .Transition("fade") .HideAddressBar(true) .Skin("flat") )@(Html.Kendo().MobileLayout() .Name("drawer-layout") .Header(obj => Html.Kendo().MobileNavBar() .Content(navbar => @<text> @(Html.Kendo().MobileButton() .Align(MobileButtonAlign.Left) .Icon("drawer-button") .Rel(MobileButtonRel.Drawer) .Url("#my-drawer") ) @navbar.ViewTitle("") @(Html.Kendo().MobileButton() .Align(MobileButtonAlign.Right) .Text("Back") .HtmlAttributes(new { @class = "nav-button" }) .Url(Url.RouteUrl(new { controller = "home" })) ) </text>) ) )@(Html.Kendo().ComboBoxFor(model => model.Impact) .Placeholder("Choose One...") .DataTextField("Text") .DataValueField("Value") .Suggest(true) .DataSource(dataSource => dataSource .Read(read => read.Action("GetImpactList", "Enum")) ))