Hi there,
I am using a grid which depends on two drop down selection. TenantId and UserId. So I add those parameter to the ej.Query. Everyhing works fine in Chrome, Firefox
but in IE and Edge the values are not correct, it takes the values from the previous POST request in the controller action (I am not using GET, therefore no caching issue)
Any help would be nice, thanks
--- Javascript
function userDropDownChange(args) {
var selectedTenant = $("#tenantDropDownList").data("ejDropDownList").getSelectedValue();
var data = ej.DataManager({ url: "/Download/GetAllFilesForAdmin", adaptor: "UrlAdaptor" });
var userQuery = new ej.Query();
userQuery.addParams("userId", args.selectedValue);
userQuery.addParams("tenantId", selectedTenant);
$("#fileGrid").ejGrid({
dataSource: data,
query: userQuery
});
}
-- ASP.NET MVC Controller Action
[System.Web.Mvc.HttpPost]
public async Task
GetAllFilesForAdmin([FromBody]
ExtendedDM dm)
{
var data = await this.fileApplicationService.GetAllFilesAsAdminForUser(new PagedResultRequestDto { MaxResultCount = dm.Take, SkipCount = dm.Skip }, dm.userId, dm.tenantId);
return Json(new { result = data.Items, count = data.Items.Count }, JsonRequestBehavior.DenyGet);
}
public class ExtendedDM : DataManager
{
public long userId { get; set; }
public int tenantId { get; set; }
}