Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a telerik modal popup. In the popup there is a telerik radgrid. On clicking a button the below ajax gets called and the radgrid gets filled if data is returned.

<script type="text/javascript">
function OnSeriesClick(args) {
var kendoWidget = args.sender;
var operationCount = args.value;
var operationType = args.category;
var userName = document.getElementById("<%= ddlUsers.ClientID %>").value;
var startDate = document.getElementById("<%= RadDateTimePicker1.ClientID %>").value;
var endDate = document.getElementById("<%= RadDateTimePicker2.ClientID %>").value;
var jsonData = "{ 'OperationType':'" + operationType + "', 'UserName':'" + userName + "', 'StartDate':'" + startDate + "', 'EndDate':'" + endDate + "' }";
var GridData;

jQuery.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: jsonData,
cache: false,
dataType: 'JSON',
url: 'ListView.aspx/GetFileNames',
success: function (result) {

GridData = result.d;

if (GridData.length > 0) {
var divGridContainer = document.getElementById('divGridContainer');
divGridContainer.style.display = "block";
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
tableView.set_dataSource(GridData);
tableView.dataBind();
alert('grid filled');
}
else {
var divGridContainer = document.getElementById('divGridContainer');
divGridContainer.style.display = "none";
alert('grid not filled');
}
},
error: function () {
alert('Error on binding the data');
}
});

var oWnd = $find('<%= modalPopup.ClientID %>');
document.getElementById('<%= txtUser.ClientID %>').value = userName;
oWnd.show();
}
</script>

While in debug mode the the ajax call is getting success in all known browsers and the modal popup with filled grid data is showing.
After deploying the project in IIS 8 the ajax call is getting success in Chrome, Edge and FF browsers and the modal popup with filled grid data is showing but the grid is not getting filled in IE. In IE it is showing the alert('grid not filled').
I inspected the IE and saw that the ajax call is getting called and gives response of 200 but in if (GridData.length > 0) it is getting failed.
I don't know what to do as while debugging in IE its working fine but after deployment its not.
Any help is much appreciated. Thank you.

What I have tried:

I don't know what to try because I am facing this issue for the very first time. I searched a lot but every where people face this issue regarding CORS. But in my case its not CORS because the ajax is getting called from code behind page.
Posted
Comments
Prava-MFS 30-Jun-16 8:40am    
As you mentioned, it's working fine on development server but not on the production server. Please clear the cache and cookie on production server and if you still face the same issue, then check the IE version on development and production system.
Member 10048252 1-Jul-16 1:40am    
The issue occurs in the same IE. The IE where I am viewing are same for both Development and Production. Further more if you view it from other machine then also the things occurs. Clearing caches of all the machines that are used to view it doesn't helped. Its pretty strange.
Prava-MFS 1-Jul-16 2:30am    
Okay. Please debug it with IE developer tool bar and paste here what issue you are getting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900